SAP2000_API_CHS_C#_GetDatabaseUnits
时间:2011-04-03 来源:AL小虾
GetDatabaseUnits
语法
SapObject.SapModel.GetDatabaseUnits
C#函数
eUnits GetDatabaseUnits();
参数
无
备注
该函数返回模型的数据单位,其枚举类型如下
lb_in_F = 1
lb_ft_F = 2
kip_in_F = 3
kip_ft_F = 4
kN_mm_C = 5
kN_m_C = 6
kgf_mm_C = 7
kgf_m_C = 8
N_mm_C = 9
N_m_C = 10
Ton_mm_C = 11
Ton_m_C = 12
kN_cm_C = 13
kgf_cm_C = 14
N_cm_C = 15
Ton_cm_C = 16
C#实例
public void ExampleGetUnits() { //变量定义 int ret; Sap2000.eUnits Units; //实例化 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(); //获取当前数据单 Units = SapModel.GetDatabaseUnits(); //退出程序 SapObject.ApplicationExit(false); SapModel = null; SapObject = null; }
相关阅读 更多 +