Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Renaming drawing views, macro?

11 REPLIES 11
Reply
Message 1 of 12
ankersen
2204 Views, 11 Replies

Renaming drawing views, macro?

On every drawing we have to rename views "View 1" to front, top, ect.  is there a macro or an addon to rename these views?  We create them in the same order every time if that helps. Example "View 1" is "Front View", "View 2" is "Top View". Also to rename them currently we double click on the view and edit text in "View Identifier".

 

Thanks

Tags (1)
11 REPLIES 11
Message 2 of 12
salariua
in reply to: ankersen

I would post this in the Inventor customisation forum.

 

This code matches the model orientation name:

 

http://forums.autodesk.com/t5/inventor-general-discussion/base-and-projected-view-label-name-to-matc...

Adrian S.
blog.ads-sol.com 

AIP2012-2020 i7 6700k AMD R9 370
Did you find this reply helpful ?
If so please use the Accepted Solutions or Like button - Thank you!
Message 3 of 12
salariua
in reply to: salariua

Silly me! you already post it in the customization forum . I am getting messages for both Inventor General and Customization and got mixed up.

Adrian S.
blog.ads-sol.com 

AIP2012-2020 i7 6700k AMD R9 370
Did you find this reply helpful ?
If so please use the Accepted Solutions or Like button - Thank you!
Message 4 of 12
NachitoMax
in reply to: ankersen

Hi,

 

are you naming the 'actual' view itself or ar wanting to name the view that is displayed on the sheet? for example:

 

You can keep the view named 'View1' and change the view LABEL to "Front Elevation"

 

 

Let me know as i made a nice handy little tool to name view labels

 

 

Thanks

 

Nigel

 

Nacho

Automation & Design Engineer

Inventor Programmer (C#, VB.Net / iLogic)


EESignature


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.


Message 5 of 12
rossano_praderi
in reply to: ankersen

Hi Ankersen,

this is a simple but efficient code, you can also use the "Case ... select" statement.

 

Dim oDoc As DrawingDocument = ThisApplication.ActiveDocument
Dim oSheet As Sheet = odoc.ActiveSheet
Dim oView As DrawingView

On Error Resume Next

For Each oView In oSheet.DrawingViews
	oView.Name = oView.Name.ToUpper.Replace("VIEW 1", "FRONT VIEW")
	oView.Name = oView.Name.ToUpper.Replace("VIEW 2", "TOP VIEW")
	'...
	'...
Next

 

The post suggested by Salariua is a good solution and I like it, but if you need a static and easy way to change directly the views name this is right for you.

 



--------------------------------------
If my post answers your question, please click the "Accept as Solution"
button. This helps everyone find answers more quickly!
---------------
Message 6 of 12

Hi

 

attached is a little tool i made a while ago. This changes the the LABEL text and switches the labels on or off. There is a zip file attached with a video of it working and the project file that you need.

 

 

to use:

 

(one time only part)

open the vba editor (Tools/Options/VBA Editor)

goto File/Load Project

Browse to the Proj_DrawingViews file from my zip file

Click the 'Open' button to load it.

 

In the project is a form called frmDrawingViews. Drag this to your inventor project (the one that is at the top called "ApplicationProject"

once you have dragged it over, click save then close the Proj_DrawingViews file (highlight it and goto File/Unload Project)

 

Thats the tool loaded & saved into your Inventor Project.

 

Got to Insert/Module (on the VBA window top menu)

inside the module, paste the following code-

 

Public Sub DrawingViews()
frmDrawingViews.Show
End Sub

 

Click save again 

 

Close VBA window

 

 

in Inventor, right click on any part of the ribbon and select "Customize User Commands"

on the op left of the pop up form, there is a dropdown box called "Choose Commands Here". click it and select "Macros"

 

Select and highlight the button called "DrawingViews"

on the right of the pop up form, select where you would like the tool to be. I alway use "Drawing | Tools

 

click the ">>" button to move it to your menu

click the tickbox for text (so you can read it)

 

Click close

 

if you then close all Inventor documents & restart, it should always be available to use.

 

to use-

 

Click the DrawingViews Button

Select the options you need and press "Go"

 

views.JPG

 

 

Hope that helps

 

 

 

Nigel.

 

 

 

Nacho

Automation & Design Engineer

Inventor Programmer (C#, VB.Net / iLogic)


EESignature


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.


Message 7 of 12

Hi Nigel, nice job.

It's only an idea, but...

Would you like to convert it as Add-in?
If you want, I will do it for you.

 

Let me know what you think about it.

 



--------------------------------------
If my post answers your question, please click the "Accept as Solution"
button. This helps everyone find answers more quickly!
---------------
Message 8 of 12

Hi

 

yeah i wanted to make this in to an addin but never got around to it. to be honest, ive got a stack of hand little tools that i wanted to convert 🙂

 

 

PM me

 

 

 

Thanks

 

 

Nacho

Automation & Design Engineer

Inventor Programmer (C#, VB.Net / iLogic)


EESignature


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.


Message 9 of 12


@nmjshaw150 wrote:

Hi

 

yeah i wanted to make this in to an addin but never got around to it. to be honest, ive got a stack of hand little tools that i wanted to convert 🙂

 

 

PM me

 

 

 

Thanks

 

 


....you never got around to it...

 

http://forums.autodesk.com/t5/inventor-customization/net-addin-final-stages/m-p/4920282#M49186

 

Are you sure?

 



--------------------------------------
If my post answers your question, please click the "Accept as Solution"
button. This helps everyone find answers more quickly!
---------------
Message 10 of 12

Lol

That was for a much larger project im working on. That is its final stages but ive decided to bling it up a little. That is a big drawing sheet tool 🙂

I'll pm you. I have a few small ones that maybe we could build into addins together and pop on the app store as a joint effort of you're interested 🙂

Nacho

Automation & Design Engineer

Inventor Programmer (C#, VB.Net / iLogic)


EESignature


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.


Message 11 of 12
ankersen
in reply to: NachitoMax

I cann't find the download file??

Message 12 of 12

Ok! PM me whenever you want..


--------------------------------------
If my post answers your question, please click the "Accept as Solution"
button. This helps everyone find answers more quickly!
---------------

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

Post to forums  

Autodesk Design & Make Report