Message 1 of 3
Finding a physical property ID?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am new to iLogic (but excited to learn!!), I am trying to modify this code from a older post to display the Sheetmetal thickness in my view's text box . The goal being to use this in our dedicated Sheetmetal drawing template. I would like to change the code's MASS to the part's "Thickness" defined in my Sheetmetal rules.
Am I able to replace the PhysicalPropertyID Number in this line: <PhysicalProperty PhysicalPropertyID='72449' to whatever the ID number for the "Thickness" Parameter? And if so how do I find this number? You may need to talk slow as I'm brand new to this! I'm grateful for any suggestions you all may offer, Many thanks in advance!
Dim oSSet As SelectSet = ThisDoc.Document.SelectSet
If oSSet.count = 0 Then
MessageBox.Show("You must select a drawing view first", "iLogic")
Exit Sub
End If
'Reference to the drawing view from the 1st selected object
Dim oView As DrawingView = trycast(oSSet.item(1), DrawingView)
If oView IsNot Nothing Then
oView.ShowLabel = True
'format the model iproperties
oDescription = "<StyleOverride Underline='True'><Property Document='model' PropertySet='Design Tracking Properties' Property='Description' FormatID='{32853F0F-3444-11D1-9E93-0060B03C1CA6}' PropertyID='29'>DESCRIPTION</Property></StyleOverride>"
oPartNumber = "<StyleOverride Underline='True'> - Mk <Property Document='model' PropertySet='Design Tracking Properties' Property='Part Number' FormatID='{32853F0F-3444-11D1-9E93-0060B03C1CA6}' PropertyID='5'>PART NUMBER</Property></StyleOverride>"
oStringMass = "<Br/><StyleOverride Underline='False' FontSize='0.35'>EST UNIT MASS = <PhysicalProperty PhysicalPropertyID='72449' Precision='2'>MASS</PhysicalProperty></StyleOverride>"
oStringScale = "<Br/><StyleOverride FontSize='0.3'>(Scale <DrawingViewScale/>)</StyleOverride>"
'add to the view label
oView.Label.FormattedText = oDescription & oPartNumber & oStringMass & oStringScale
Else
MessageBox.Show("The selected object is not a drawing view", "iLogic")
End If