设计背景:
施工图序号:13和施工图套图号:00870029DR2ME078,把上面两个属性合并为代号:00870029DR2ME078-13。
iLogic代码:
Sub Main
FindOrCreateProperty("代号",iProperties.Value("Custom", "施工图套图号") & "-" & iProperties.Value("Custom", "施工图序号").ToString())
End Sub
Function FindOrCreateProperty(propName As String, propValue As Object)
oDoc = ThisDoc.Document
Dim propSet As PropertySet = oDoc.PropertySets.Item("Inventor User Defined Properties")
Dim invProperty As Inventor.Property
For Each invProperty In propSet
If (invProperty.Name = propName) Then invProperty.Value = propValue
Next
End Function
网友评论