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
I would post this in the Inventor customisation forum.
This code matches the model orientation name:
Silly me! you already post it in the customization forum . I am getting messages for both Inventor General and Customization and got mixed up.
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)
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.
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.
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"
Hope that helps
Nigel.
Nacho
Automation & Design Engineer
Inventor Programmer (C#, VB.Net / iLogic)
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.
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.
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)
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.
@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?
Nacho
Automation & Design Engineer
Inventor Programmer (C#, VB.Net / iLogic)
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.