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: 

Master Assembly iLogic Save As New Assembly With Sub-Assemblies and Parts Updated To New Assembly Name.

2 REPLIES 2
Reply
Message 1 of 3
Anonymous
600 Views, 2 Replies

Master Assembly iLogic Save As New Assembly With Sub-Assemblies and Parts Updated To New Assembly Name.

My question to all:

 

Is there a way that I can create a master assembly that contains multiple subassemblies and parts as a generic assembly or template; and do a save as or ilogic rule that will save a copy to a different file location and different name? Once saved it will update all assembly, sub-assembly, and part number information so that the new copy can be modified (height, length, width, ect.) without interfering with the Master assembly (template) or future renamed copies. I would like my master assembly to contain created parts and content center parts if possible.

 

I am using Windows 10, 64-bit operating system, Autodesk Inventor Professional 2019

Labels (1)
2 REPLIES 2
Message 2 of 3
R.Mabery
in reply to: Anonymous

Look at the iLogic Design Copy tool and/or CopyDesign in Vault.

 


Thanks,
Randy Mabery
Applications Expert
IMAGINiT Technologies
Message 3 of 3
WCrihfield
in reply to: Anonymous

Just a thought:

While looping through each oRefDoc As Document In AllReferencedDocuments of your main assembly, check the oRefDoc.AllReferencedDocuments.Count.  (Likely only needed for AssemblyDocuments).  If more than zero, loop through them too (perhaps using a recursive Sub routine), saving them off in the new location, and new name.  Then the parent document (assembly or sub assembly), then do the Replace process.

 

I believe you will need to climb as far down through the layers as possible, checking the Count, and when the Count is zero, then proceed to save them out, and replace them.  Then as each lower loop finishes, it will climb back up through the layers until it finishes.  This way, each new part file exists in the new location(s), with their new names, before the new assembly(s) that should contain them is created in the new location(s), with its new name.  Understand?

This should work faster than iterating through each ComponentOccurrence, because there may be several instances of each ComponentOccurrence.  Although, if you were to loop through the ComponentOccurrences, you could just check to see if the file already exists in its intended new location, before processing it again.  Replacing them later is easiest when done with the ComponentOccurrence object, rather than dealing with references.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

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

Post to forums  

Technology Administrators


Autodesk Design & Make Report