Message 1 of 3
New line in commandmanager.pick label
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Afternoon,
One of our tools is a probe that displays part properties. The code for it is shown below.
Line 22 defines the probe label that shows when a part is selected. I would like each of the 5 properties to shown on their own line, rather than in 1 continuous line. I have tried vbCrLf with no luck.
Any ideas?
TheStart :
On Error GoTo endof
Dim doc = ThisApplication.ActiveDocument
Dim entity = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kAssemblyLeafOccurrenceFilter, "Select a Part - or ESC to exit")
If (Not entity Is Nothing) Then
oOne = "Part Number: " & iProperties.Value(entity.Name, "Project", "Part Number")
oTwo = "Mass: " & Round(iProperties.MassOfComponent(entity.Name), 2) & " kg"
oThree = "Material: " & iProperties.MaterialOfComponent(entity.Name)
oFour = "Designer: " & iProperties.Value(entity.Name, "Project", "Designer")
oFive = "Description: " & iProperties.Value(entity.Name, "Project", "Description")
'--------------Show File Name in oFive if Description iProp is empty---------------
If iProperties.Value(entity.Name, "Project", "Description") = "" Then : oFive = "Description: " & entity.Name : End If
Dim oSet1 As HighlightSet ' Create a highlight set.
oSet1 = doc.CreateHighlightSet
oSet1.Color = ThisApplication.TransientObjects.CreateColor(255, 108, 180) ' Change the color
Call oSet1.AddItem(entity)
bob = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kAssemblyLeafOccurrenceFilter, (oOne & " - " & oTwo & " - " & oThree & " - " & oFour & " - " & oFive))
bob = ""
Call oSet1.Clear
End If
If (Not entity Is Nothing) Then 'Allow Escape to Exit
GoTo TheStart :
End If
Return
endof :