Hi,everyone Recently,i need to use AutoCAD plot the inventorDWG drawing,and,some infomation need to use,such as Project,latestRev....,So i want add attributes for each sheet.
Dim oDoc As DrawingDocument
oDoc = ThisApplication.ActiveDocument
Dim oSh As Sheet
oSh = oDoc.ActiveSheet
Dim oAttSets As AttributeSets
oAttSets = oSh.AttributeSets
Dim oASet As AttributeSet
Try
oASet = oAttSets.Add("Drawing_Version",True)
Catch
oASet = oAttSets.Item("Drawing_Version")
End Try
oASet.Delete
Try
oASet = oAttSets.Add("Drawing_Version",True)
Catch
oASet = oAttSets.Item("Drawing_Version")
End Try
Dim oAtt As Inventor.Attribute
oAtt = oASet.Add("ProjectCode", ValueTypeEnum.kStringType, "NTTX")
oAtt = oASet.Add("SystemCode", ValueTypeEnum.kStringType, "UYT-WCG-STP")
oAtt = oASet.Add("LatestRevNumber", ValueTypeEnum.kStringType, "C")
oAtt = oASet.Add("VersionATime", ValueTypeEnum.kStringType, "2023/05")
oAtt = oASet.Add("VersionBTime", ValueTypeEnum.kStringType, "2023/12")
oAtt = oASet.Add("VersionCTime", ValueTypeEnum.kStringType, "2024/04")
If the inventorDWG drawing opened in AutoCAD,the drawing.sheet be named layout.
The problem is how get Inventor drawingsheet attributes in AutoCAD application?
Is anybody have any idea?
Thanks.
It can be confusing, but Attributes in Inventor is completely different thing than in AutoCAD. In my opinion there is no way to read this in AutoCAD.
Attributes in Inventor is just an information layer which can be used to store information connected to Inventor objects.
I think maybe the inventor attributes is like the Layout's property: "Xdata" or "ExtensionDictionary" in the AutoCad.
But i am not read them out successfully.
Can't find what you're looking for? Ask the community or share your knowledge.