SAP2000_API_CHS_C#_SetProjectInfo
时间:2011-04-04 来源:AL小虾
SetProjectInfo
语法
SapObject.SapModel.SetProjectInfo
C#函数
int SetProjectInfo(string Item, string data);
参数
Item:信息名称 Data:信息内容
备注
该函数用以设置工程信息,成功执行返回0值否则返回非0值
C#实例
public void Example() { //变量定义 int ret; //实例化 Sap2000.SapObject SapObject = new Sap2000.SapObject(); Sap2000.cSapModel SapModel = new Sap2000.cSapModel(); //运行程序 SapObject.ApplicationStart(); //新建模型D ret = SapModel.InitializeNewModel(Sap2000.eUnits.kip_ft_F); //新建空白文档 ret = SapModel.File.NewBlank(); //设置工程信息 ret = SapModel.SetProjectInfo("Company Name", "Computers and Structures, Inc."); ret = SapModel.SetProjectInfo("Project Name", "API Testing"); ret = SapModel.SetProjectInfo("My Item", "My Data"); //退出程序 SapObject.ApplicationExit(false); SapModel = null; SapObject = null; }
相关阅读 更多 +