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
本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!
