Import 'design view representation' name data to formatted text 'detail label' in drawing view

Import 'design view representation' name data to formatted text 'detail label' in drawing view

josh.linares-stanley
Enthusiast Enthusiast
417 Views
3 Replies
Message 1 of 4

Import 'design view representation' name data to formatted text 'detail label' in drawing view

josh.linares-stanley
Enthusiast
Enthusiast

Is anyone aware of some ilogic that would import the 'design view representaion' name into the formatted text label beneath my part in a drawing view.

Images below should illustrate what i am looking for.

Thanks in advance,

 

joshlinaresstanley_0-1641823033127.png

joshlinaresstanley_1-1641823074201.png

 

 

 

0 Likes
Accepted solutions (1)
418 Views
3 Replies
Replies (3)
Message 2 of 4

WCrihfield
Mentor
Mentor
Accepted solution

Hi @josh.linares-stanley.  This solution may be a bit too simplistic, but here is a small iLogic rule that will allow you to pick a drawing view, then it gets the name of the design view representation it is currently set to, then adds that text to the beginning of the existing text of the view's label, on a line of its own, similar to where you have the image circled.

oObj = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kDrawingViewFilter, "Select a drawing view.")
If IsNothing(oObj) Then Exit Sub
If Not TypeOf oObj Is DrawingView Then Exit Sub
Dim oView As DrawingView = oObj
oDVRepName = oView.DesignViewRepresentation
oView.ShowLabel = True
oView.Label.FormattedText = oDVRepName & vbCrLf & oView.Label.FormattedText

If this solved your problem, or answered your question, please click ACCEPT SOLUTION.
Or, if this helped you, please click (LIKE or KUDOS) 👍.

If you want and have time, I would appreciate your Vote(s) for My IDEAS 💡 or you can Explore My CONTRIBUTIONS

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 3 of 4

josh.linares-stanley
Enthusiast
Enthusiast

Excellent works really well.

0 Likes
Message 4 of 4

Stakin
Collaborator
Collaborator

 

Dim oView As DrawingView
Dim oDoc As DrawingDocument
oDoc=Thisapplication.ActiveDocument
oView=oDoc.ActiveSheet.Views.Item(1)
Dim oPvName As String
oPvName=oView.ActivePresentationView()
oView.Label.FormattedText=oPvName & “<Br/>” & "<DrawingViewName/>" & "-" & "<DrawingViewName/>" & “<Br/>” & "<Delimiter/>" & “<Br/>” & “<DrawingViewScale/>”  

 

Try it ,Not Tested

0 Likes