Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have some iLogic that allows the user to select if the view is a flat pattern or drawing view and changes the view label to have certain properties pulled from the iproperties of the part. I'm looking to change it to allow to user to preselect one or more views and have it run through each view and change the label of each one. I'm looking for some code that will help with the preselected views. Below is my current working code prior to any changes.
booleanParam = InputRadioBox("Select type of view", "Flat Pattern View", "Drawing View", True, "Select View Type")
If booleanParam = True Then
Dim oView As DrawingView
oView = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kDrawingViewFilter, "Select View")
oView.ShowLabel = True 'show label for selected view
If oView IsNot Nothing Then
''Get Information from view model
oDescription = "<StyleOverride Underline='True'><Property Document='model' PropertySet='Design Tracking Properties' Property='Description' FormatID='{32853F0F-3444-11D1-9E93-0060B03C1CA6}' PropertyID='29'>DESCRIPTION</Property></StyleOverride>"
''Used for part number
'oSize = "<StyleOverride Underline='True'> <Property Document='model' PropertySet='Design Tracking Properties' Property='Size' FormatID='{32853F0F-3444-11D1-9E93-0060B03C1CA6}' PropertyID='5'>PART NUMBER</Property></StyleOverride>"
oLabel = "<StyleOverride Underline='True' FontSize='0.456875' Bold='True'><Property Document='model' PropertySet='User Defined Properties' Property='Label' FormatID='{D5CDD505-2E9C-101B-9397-08002B2CF9AE}' PropertyID='5'>SIZE</Property></StyleOverride>"
oStringScale = "<Br/><StyleOverride Underline='False' FontSize='0.305' Bold='False'>SCALE <DrawingViewScale/></StyleOverride>"
'add to the view label
oView.Label.FormattedText = oLabel & oStringScale
Else
Return
End If
Else If booleanParam = False Then
Dim oView As DrawingView
oView = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kDrawingViewFilter, "Select View")
oView.ShowLabel = True 'show label for selected view
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>"
oStringScale = "<Br/><StyleOverride Underline='False' FontSize='0.305' Bold='False'>SCALE <DrawingViewScale/></StyleOverride>"
'add to the view label
oView.Label.FormattedText = oDescription & oStringScale
Else
Return
End If
End If
Solved! Go to Solution.