Create new Assembly from existing Assembly or Template and save as new file.

Create new Assembly from existing Assembly or Template and save as new file.

swatkins3YWDA
Contributor Contributor
1,587 Views
7 Replies
Message 1 of 8

Create new Assembly from existing Assembly or Template and save as new file.

swatkins3YWDA
Contributor
Contributor

I'm having trouble getting started.  What I want to achieve is to start an assembly and use iLogic to change iPart  tables and save the model as a new assembly with specific file name and folder location.  I'm just a little confused where to begin.  Do I start with a template that has the assembly already built or do I start with an existing assembly model, which either would have to have a save as. I have managed to get the parameters to control the hub bore and shaft sizing.  Looking also to control the bearing component iPart table according to the hub bore ID and shaft OD.  I'm new to iLogic so a little confused getting started.    Also this work will have to be applied to many different hub styles and configurations.  Then eventually drawing automation for customer and shop drawings.  I just need help getting started and the drawing automation will be done later.

 

Thank for the help,

Samantha

 

Inventor 2022.2

0 Likes
Accepted solutions (1)
1,588 Views
7 Replies
Replies (7)
Message 2 of 8

A.Acheson
Mentor
Mentor

First things first. Is your starting base a regular assembly with iparts? 

 

iAssembly is a fully configured table so ilogic would just switch the members, so you wouldnt be changing it on the fly with ilogic. Your title could be misleading. Could you show an image of the file structure and what your looking to change. 

 

If these are all constant changes then an iassembly might be helpful but if there is custom assembly distances etc you may end up with just an ilogic controlled assembly controlling ipart/iassembly members. 

 

Can you share the code your working with and some sample files?  I will not be able to open them but other forum members might and can offer advice. 

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

swatkins3YWDA
Contributor
Contributor

Sorry, I'm very new to iLogic and may not know all the terminology.  I may not have explained my intentions clearly.  What I want to do is to create an iAssembly, within that assembly I will have a hub, bearings, shaft, seals, and lock nut.  The hub and shaft will be adjusted as per customer specs.  I figure this is where iLogic and Forms come into play.  I know iLogic should be able to control the bearing, seal and nut sizes from the iPart table.  Also know iLogic can somehow create an assembly model with a new file name from the parameters given.  Where I'm confused at, is do I start with an iAssembly file and rename it or do I start with a template with the assembly with constrained parts and iParts.  I really don't have a full assembly model or code, as I have started over many times getting the parts stable for future use in the assembly. 

 

Hope this clears things up a little bit.

 

Samantha

0 Likes
Message 4 of 8

A.Acheson
Mentor
Mentor

Ok I think you are wanting  an iLogic assembly which you will place using place ilogic component, then change the parameters before placing. The file names that need to be changed like the main assembly, ilogic driven part will be saved to the local work space, custom ipart I believe will be saved to the route project folder. You will not be able to control the file names of these files. They will just get an index number based on existing files. Example here has one ilogic part and regular iparts.

AAcheson_0-1643926785453.png

Files saved

AAcheson_1-1643927072540.png

You could develop a routine to rename these parts with ilogic afterwards if needs be. 

The browser names circled have been normalized ie,  renamed to keep a constant reference in the assembly regardless of files being switched in and out.

Switch a member using  this snippet where Flange is the File Reference and 3 being the member row number. 

iPart.ChangeRow("Flange", 3)

 A tip:

If you are adding any iparts be sure to give a full file path as you will get a quicker response time than searching the complete project.

 

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

swatkins3YWDA
Contributor
Contributor

The assembly model will a stand alone model.  More than likely will not be inserted into a larger assembly but may need to be.  Most of these designs are customer specific and that all they order.  At times we do build the complete assembly for the customer where the hubs will be mounted.  I do not need to rename the iParts as they will be from our standard drawing files.  The Hub and Shaft will need to be renamed for specific customer number and hub description.  My issue of confusion do I start this workflow from a assembly template or existing assembly file.  I have the hub and shaft built with all the parameters named and is in stable condition for editing using ilogic.  The iParts are built and are ready to build the assembly.  We have a folder where all the iParts are located along with the different configuration of shaft to be used and controlled using iLogic. 

 

Samantha

0 Likes
Message 6 of 8

A.Acheson
Mentor
Mentor

Hi Samantha,

 

A template assembly or regular assembly would give you similar results I would think. Template assembly does nothing more than to create a new assembly. 

 

Based on your new information and that of the initial post about future drawing automation I would think just performing a save as and look for a similar drawing name and save as and change file reference for the drawing would work for you. Alternatively  perform a manual ilogic copy design/ design assistant copy and rename before you begin. 


You may be better placing all files that are not changing into a library/read only folder to prevent unwanted changes happening. If a change is needed then perform a save and replace and the part can come to the project folder and is project specific at that point. 


Hopefully that makes sense. 

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

swatkins3YWDA
Contributor
Contributor

One more question, if for say this assembly has a regular part model in the assembly.  Can I do a save as of said part in the assembly using iLogic to a new name and folder location and also save as the assembly to a new name also?  Others here may not know how to do the copy design work flow.  Trying to make this simple for others to achieve the end results.

0 Likes
Message 8 of 8

A.Acheson
Mentor
Mentor
Accepted solution

If you can write down the manual steps you take you should be able to code up the same action. Take a look at the ilogic snippets of component replace and document save as. 

 

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