The problem of AutoCAD application get the Inventor drawingsheet attributes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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.