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: 

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

9 REPLIES 9
SOLVED
Reply
Message 1 of 10
Anonymous
2179 Views, 9 Replies

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

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

9 REPLIES 9
Message 2 of 10
kelly.young
in reply to: Anonymous

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.

 

Message 3 of 10
Anonymous
in reply to: kelly.young

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?

Message 4 of 10
kelly.young
in reply to: Anonymous

@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.

Message 5 of 10
Anonymous
in reply to: kelly.young

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? 

Message 6 of 10
kelly.young
in reply to: Anonymous

@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.

Message 7 of 10
Anonymous
in reply to: kelly.young

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.

Message 8 of 10
doug.johnston
in reply to: Anonymous

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 !!!!!
Message 9 of 10
Anonymous
in reply to: doug.johnston

Doug,

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

Message 10 of 10
Anonymous
in reply to: doug.johnston

Hi Doug!

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

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

Post to forums  

Autodesk Design & Make Report