Generating and saving drawings for iParts

Generating and saving drawings for iParts

cass8435
Explorer Explorer
718 Views
4 Replies
Message 1 of 5

Generating and saving drawings for iParts

cass8435
Explorer
Explorer

I've created an iPart with 500+ variations of the same part (essentially just a cube with every combo of height, width, and depth). I need to now create a drawing for every one of these parts. I know I can make copies of the drawing and then just replace the view or model for each one, however with such a large amount of parts I was hoping I could create some sort of iLogic to generated the copies and replace the views. 

 

Before I go down this rabbit hole, can anyone tell me if this is even possible or if it has been done before?

 

Thanks!

0 Likes
Accepted solutions (1)
719 Views
4 Replies
Replies (4)
Message 2 of 5

WCrihfield
Mentor
Mentor

Hi @cass8435.  I no longer use iParts, and have not created code to automate that specific process before, but I have worked with similar codes before for creating/copying drawings, and replacing model file references in drawings.  Automating that process does sound doable by code, in theory.  I am not super familiar anymore with the details of if different iPart member models faces/edges will be recognized when simply replacing one model file reference with another, but it seems like it should work since they should all share the same ancestry.  If so, then all the dimensions should stay when changing the model references.  I do not recall if dimension & leader note text placements will stay at the same offsets from model edges though when switching between models with extreme size differences.  However, I do not think this is a good job for a simple iLogic rule that is ran while you are using Inventor.  A task this large should probably be scheduled somehow, like with the Inventor Task Scheduler, or maybe handled by an Inventor add-in, because it will likely require a lot of system resources, and may crash your instance of Inventor, or freeze it up for a while.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

Message 3 of 5

A.Acheson
Mentor
Mentor

Hi @cass8435 

This is certainly possible by automating the reference replacement and saving as process. The annotation will stay in place but will move around depending on how large the size change is of the member. I would suggest to do a drawing for the smallest then change the member to the largest. Can you live with the annotation position? It will effectively change like this for all members. If it is really bad then you can automate the annotation placement itself. This is a step up in skill but is workable with named faces/edges. I have done both so let me know if you want assistance. There is samples floating around on this forum for automating the ipart drawing and then the annotation will be a sub routine within that process. 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
0 Likes
Message 4 of 5

cass8435
Explorer
Explorer

Hi Alan,

The annotation position movement is completely fine as both the smallest and the biggest size fit well and the annotations move in an acceptable way. I just need help with creating the iLogic to generate the files and replace the model reference. Unfortunately I am not super familiar with iLogic and have only used it for a few things so I have been looking at code examples but they get very confusing very quickly. If you have a link to a good example that would be amazing as I cannot seem to find one yet.

 

Thanks,

Cass

0 Likes
Message 5 of 5

A.Acheson
Mentor
Mentor
Accepted solution

Hi @cass8435 

Here is a post with this exact request. Don't forget to kudos Joel the original poster of the ilogic rule. 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan