Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Design View Name on Drawings

3 REPLIES 3
Reply
Message 1 of 4
paulZKN98
856 Views, 3 Replies

Design View Name on Drawings

Hi inventor world.  Is there an out of the box way to insert my Design View (Representation View) name into my text box?   I am using Inventor 2022.  I found this issue brought up in a 2004 post but was never solved.  Any suggestions would be appreciated! 

 

Thanks,

Paul

3 REPLIES 3
Message 2 of 4
mcgyvr
in reply to: paulZKN98

Do you need this for ALL views on all sheets? only select ones,etc..?

 

Here is some starting code to simply go through all views/sheets and set the view label to the design view rep of that view.

Dim oSheets As Sheets
Dim oSheet As Sheet
Dim oViews As DrawingViews
Dim oView As DrawingView
Dim oModelDoc As Document
Dim oViewRep As String

oSheets = ThisDoc.Document.Sheets

For Each oSheet In oSheets
	oViews = oSheet.DrawingViews
    	For Each oView In oViews
			oView.ShowLabel = True
			oModelDoc = oView.ReferencedDocumentDescriptor.ReferencedDocument
			oViewRep = oView.DesignViewRepresentation
			oView.Label.FormattedText = "Design View Rep: " & oViewRep
    	Next
Next

 



-------------------------------------------------------------------------------------------
Inventor 2023 - Dell Precision 5570

Did you find this reply helpful ? If so please use the Accept Solution button below.
Maybe buy me a beer through Venmo @mcgyvr1269
Message 3 of 4
paulZKN98
in reply to: mcgyvr

Thanks for the reply @mcgyvr.  I would only need this intermittently,  so not on every page.  Only in instances where the model/assembiles are not structured well enough to just drop a view from the highest level assembly. 

 

 Thankyou for the code but I'm not experienced enough to know what to do with this without fumbling around, this is for the VBA Editor correct? (getting better at VBA is on my Wishlist!)

Thanks again

Message 4 of 4
mcgyvr
in reply to: paulZKN98

@paulZKN98 This is just "ilogic" and does not use the VBA editor.. You can just use the "ilogic browser" which you can turn on going to the "View" tab and in the "User Interface" dropdown select the "Ilogic" browser and it will show up next to your model browser ..

We could make some code where you simply run the code and it prompts you to select a view and it would automatically set the view label as needed. Would that be useful?  If so just let us know exactly what you want the view label to say/what properties it should display,etc...

 

But NO.. There is no "out of the box" for that..



-------------------------------------------------------------------------------------------
Inventor 2023 - Dell Precision 5570

Did you find this reply helpful ? If so please use the Accept Solution button below.
Maybe buy me a beer through Venmo @mcgyvr1269

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report