Drawing Automation, I have a sub assembly and want to find the file name of the parrent Top level assembly

Drawing Automation, I have a sub assembly and want to find the file name of the parrent Top level assembly

G.Binl
Advocate Advocate
387 Views
4 Replies
Message 1 of 5

Drawing Automation, I have a sub assembly and want to find the file name of the parrent Top level assembly

G.Binl
Advocate
Advocate

Hello Everyone,

using  Inventor professional 2023

My goal is to look at a sub assembly in a drawing and find the parent top level assembly file it belongs to.

1. Open a new drawing, place base Tube & Pipe.iam (T&P) on sheet (manually done)

2. I want to run ilogic to select T&P, look for its parent top level assembly and grab that name.

3. Create new sheet, Read available Representation of that file and select representation, Place base veiw (1), (2),(3). ect. using that file name.

not sure if this is possible

Thanks in advance

 

 

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

A.Acheson
Mentor
Mentor
Accepted solution

If your structure is this Parent.iam, T&P.iam and you place only T&P .iam in the drawing then you won't be able to find the Parent easily. The sub assembly doesn't know anything about the Parent. You have to look down from parent to find the child sub assembly. As a workaround,  If your parent is in a known folder relative to the child then you could search the .iams in that folder and find the child then place the views. 

 

If you apprach can be flexible and wanted too you could launch a rule from the Parent to place View reps and or Sub assemblies to the drawing. If you have more info about the workflow please share. 

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

G.Binl
Advocate
Advocate

oops

0 Likes
Message 4 of 5

G.Binl
Advocate
Advocate

Thanks for the reply this was my thinking but was hoping it was not the case. i have been rethinking how i will approach this and this is how.

1. Bring in Top level (Parent) as Front View.

2. Do something (Make cover sheet)

3. Read Parent Tree, Then identify T&P ask if you would like to complete drawing using T&P that has been identified

4. Run script to create all T&P drawings.

5. manual clean up of all drawing.

This is my goal with frame drawings as well

Wish me luck.

Message 5 of 5

A.Acheson
Mentor
Mentor

Yes many ways to achieve this. I launch the drawings from my assembly as it is the parent and I like it open for processing. If you need any help on a workflow just post up the question and I would be happy to help. I do have a script for switching on route centerlines when using view reps of the main tube and pipe assembly. I am sure it can be adapted for single run views as well. 

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