Inventor Setting Up Macro To Automate Drawing View & Parts List Creation

Anonymous

Inventor Setting Up Macro To Automate Drawing View & Parts List Creation

Anonymous
Not applicable

Hello,

 

I'm making exploded views and when I start it up I basically always do the following:

1. Open the assembly. (from Vault)

2. Make a new .ipn, Create a View and Copy Properties (user command made by an ex-coworker).

3. Make a new .dwg on a custom template saved in the Templates folder as 'template spare.dwg'. 

4. Create a base view of the .ipn and one of the assembly.

5. Place a parts list from the assembly BOM.

 

After that I'll tweak the parts and annotate after on the drawing.

I was wondering if steps 2 to 5 could be automated with the Macro Tool or VBA Editor, I know very little about programming and hope somebody could help! Maybe an example or a tutorial/guide I can read?

 

Thanks in advance! 

 kelly.young has edited your subject line for clarity: Setting up Macro

0 Likes
Reply
Accepted solutions (1)
2,179 Views
9 Replies
Replies (9)

kelly.young
Autodesk Support
Autodesk Support

Hello @Anonymous I see that you are visiting as a new member to the Inventor Forum.
Welcome to the Autodesk Community!

 

My first thought, can you use Replace Model Reference to just swap out the .iam and .ipn?

 

ReplaceModelReference.png

 

Please select the Accept as Solution button if a post solves your issue or answers your question.

 

Anonymous
Not applicable

Hi Kelly thank you!

Yes I can, but I don't think it's more time efficient. Creating a new .dwg seems faster. Or is it used for creating the macro? Swapping out the .iam on the drawing I just worked on with the next .iam I'll work with right?

0 Likes

kelly.young
Autodesk Support
Autodesk Support

@Anonymous I'm not really sure, but if they are similar setups with consistent origin use, the replacement should orient the part at the same scale, view orientation, and location, saving time on the placement.

 

If the parts are the same name but different parametric sizes, the dimensions could possibly stick. I would implement Copy Design principles if that were the case though. 

 

I don't know of a macro way to do what you're asking, maybe some fancy iLogic. You would be more apt to find an answer on that avenue at the Inventor Customization Forum where community experts can comment further. 

 

Please select the Accept as Solution button if a post solves your issue or answers your question.

Anonymous
Not applicable

Some assemblies have different scales and the view orientation is also dependent. I normally adjust those when I place the Base Views, but as that can't be automated I didn't include it in the steps. So I was thinking of adjusting those later if needed. Thanks for all your help, should I post a new thread on the Customization Forum? 

0 Likes

kelly.young
Autodesk Support
Autodesk Support
Accepted solution

@Anonymous I'm not sure if this is helpful as I don't think actual macros integration is what you're looking for, but found a good workflow on the German Inventor Forum about how to include macros in Inventor. 

 

Include macros in Inventor

I opened in Chrome and it translated easily. 

Translate.png

 

Please select the Accept as Solution button if a post solves your issue or answers your question.

0 Likes

Anonymous
Not applicable

It does seem like writing a macro in VBA Editor is the only way. Hopefully I'll figure out how. Thanks for all your help.

0 Likes

doug.johnston
Advocate
Advocate

m.hanegraaf, 

 

I have (2-3) ilogic programs that I think will get you close to automating your drawing views and parts lists.  Unfortunately I am really swamped right now so I can't post those programs.

 

I will try and post them this weekend so you can see if they will help you.

 

The programs changes the border size, inserts a specific titleblock, inserts a parts list style based on the titleblock selection and one locates the drawing views in specific positions on the drawing.

 

Instead of using macros & VBA, I usually program inside one rule to run another rule; so I am only "pressing one button" to run multiple rules.  That is very easy to do using a one-line ilogic snippet.

 

Check back at the beginning of next week and I should have the rules posted.


---------------------------------------------------
It's not easy maintaining this level of insanity !!!!!

Anonymous
Not applicable

Doug,

That's sounds very nice! I'll post a reminder next Tuesday then, looking forward to your solution.

0 Likes

Anonymous
Not applicable

Hi Doug!

I was wondering if you have the iLogic programs available yet, excited to test them out. 🙂 

0 Likes