美文网首页
019 - Inventor把两个自定义属性合并为一个自定义属性

019 - Inventor把两个自定义属性合并为一个自定义属性

作者: 怪怪001 | 来源:发表于2024-06-20 21:00 被阅读0次

设计背景:

施工图序号: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

相关文章

网友评论

      本文标题:019 - Inventor把两个自定义属性合并为一个自定义属性

      本文链接:https://www.haomeiwen.com/subject/xukhcjtx.html