Message 1 of 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I have the following ilogic script that formats flat pattern views. It does work, However i'd prefer for the "Thickness" to be custom design tracking property like the other iproperties that are in 'grey'. oGauge seems to just quote the current value instead of tie the text to the true value of the model.
doc = ThisDoc.Document For Each oSheet In doc.Sheets For Each oView In oSheet.DrawingViews If oView.IsFlatPatternView Then 'capture the current view label ViewLabel = oView.name 'clear current view label oView.Label.FormattedText = "" oModelName = _ oView.ReferencedDocumentDescriptor.ReferencedDocument.DisplayName Try oMaterial = "<StyleOverride Underline='False'><Property Document='model' PropertySet='Design Tracking Properties' Property='Material' FormatID='{32853F0F-3444-11D1-9E93-0060B03C1CA6}' PropertyID='29'>DESCRIPTION</Property></StyleOverride>" oGauge = iProperties.Value(oModelName, "Custom", "Thickness") oDescription = "<StyleOverride Underline='false'> - <Property Document='model' PropertySet='Design Tracking Properties' Property='Description' FormatID='{32853F0F-3444-11D1-9E93-0060B03C1CA6}' PropertyID='29'>DESCRIPTION</Property></StyleOverride>" oPartNumber = "<StyleOverride Underline='false'><Property Document='model' PropertySet='Design Tracking Properties' Property='Part Number' FormatID='{32853F0F-3444-11D1-9E93-0060B03C1CA6}' PropertyID='5'>PART NUMBER</Property></StyleOverride>" oStringScale = "<Br/><StyleOverride FontSize='0.25'>(SCALE <DrawingViewScale/>)</StyleOverride>" 'add the the iProperty to the current view label, with a dash separator oView.Label.FormattedText = oPartNumber & oDescription & "<Br/>CONSTRUCTED FROM " & oGauge & " THK " & oMaterial & oStringScale & "<Br/>FLAT PATTERN" Catch 'do nothing if error End Try End If Next Next
Solved! Go to Solution.