XXXXSSS 发表于 2014-10-16 17:07:32

CustomInfo2等价GET2

Sw2006以前版本获得文件属性 ,只能用GetCustomXXXX方法
solidworks document is open to which custom properties have been assigned.
'
For Each vCustInfoName In vCustInfoNameArr
Debug.Print " " & vCustInfoName
Debug.Print " Type = " & swModel.GetCustomInfoType3(vConfigName, vCustInfoName)
Debug.Print " Value = " & swModel.GetCustomInfoValue(vConfigName, vCustInfoName)
Debug.Print " Text = " & swModel.CustomInfo2(vConfigName, vCustInfoName)
Next
Sw2007以后版本的API获得文件属性,增加了Get2方法
swCustPropMgr.Get2 vPropNames(j), valOut, resolvedValOut
custPropType = swCustPropMgr.GetType2(vPropNames(j))
Debug.Print " Name, type, and resolved value of custom property: " & vPropNames(j) & " - "; custPropType & " - " & resolvedValOut
详见SW的帮助文件。

jyzas001 发表于 2017-8-12 10:21:14

进来学习:):):)
页: [1]
查看完整版本: CustomInfo2等价GET2