当前位置:   article > 正文

inventor名称图号分离宏_图号分离宏程序

图号分离宏程序

Sub splitName()
Dim oDoc As Inventor.Document
Set oDoc = ThisApplication.ActiveDocument

'获取名称
Dim fName As String
fName = Left(oDoc.DisplayName, Len(oDoc.DisplayName) - 4)
'Debug.Print fName

'分离名称图号
Dim sName() As String
sName() = split(fName, "#")
'Debug.Print sName(0)

' Get the design tracking property set.
  Dim invCustomPropertySet As PropertySet
  Set invCustomPropertySet = oDoc.PropertySets.Item("Inventor User Defined Properties")

' Edit the values of a couple of properties.
invCustomPropertySet.Item("零件号").Value = sName(0)
invCustomPropertySet.Item("零件名称").Value = sName(1)


End Sub
 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/知新_RL/article/detail/771859
推荐阅读
相关标签
  

闽ICP备14008679号