Automatically update assembly parameter from part component

Automatically update assembly parameter from part component

Mirtchii
Advocate Advocate
1,320 Views
6 Replies
Message 1 of 7

Automatically update assembly parameter from part component

Mirtchii
Advocate
Advocate

Hello all iLogic Masters,

 

I want to link some parameters from a part which is within an assembly using iLogic so that when I modify the part, the assembly will automatically updated. In my case, I change the number of holes in part, then I want the number of bolts in the assembly automatically changed.(By the Pattern command) 

Yes, it is easy to link using the Link button in the parameter table or using simple iLogic

CoolerQuantity = Parameter("Part1:1", "CoolerQuantity")

 But I want something more than that. Below is my workflow:

1. I make a part then link the part parameter to the assembly using iLogic as above.

2. I want to make new part and new assembly and use command "Save as" for assembly and "Save and replace" for part.

And here come the problem: The iLogic code is not automatically change, which gives me only option: Link them again by hand. 

In our company, this kind of job happens very often, which is time consuming and easily get the wrong parameters.  

And I know just a little about iLogic so i really need your help with this.

I appreciate any help. If you need more information, feel free to ask.

Thank you for spending time helping me.

 

Mirtchii

 

0 Likes
Accepted solutions (1)
1,321 Views
6 Replies
Replies (6)
Message 2 of 7

LarsBJepsen
Advocate
Advocate

Have you tried copying assembly including part using Design assistant? That should maintain relationship between assembly and part when copied.

Message 3 of 7

johnsonshiue
Community Manager
Community Manager

Hi! I think you may want to use iLogic Design Copy (close all files -> Tools). However, you will need to edit the rule afterwards since the more than likely the component names have been changed in the new copy.

Many thanks!



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
Message 4 of 7

Mirtchii
Advocate
Advocate

Hello,

Thank you very much for your supports.

From your answers, there is no way an iLogic code can solve this problem. 

I will have to keep up with this problem.

Mirt

0 Likes
Message 5 of 7

johnsonshiue
Community Manager
Community Manager

Hi Mirt,

 

Could you share the example you are working on? I am not sure if there is a way to do exactly you are looking for. But, it is impossible to tell without seeing the files.

Many thanks!



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
0 Likes
Message 6 of 7

Curtis_Waguespack
Consultant
Consultant
Accepted solution

@Mirtchii wrote:

 But I want something more than that. Below is my workflow:

1. I make a part then link the part parameter to the assembly using iLogic as above.

2. I want to make new part and new assembly and use command "Save as" for assembly and "Save and replace" for part.

And here come the problem: The iLogic code is not automatically change, which gives me only option: Link them again by hand. 

 

 


Hi @Mirtchii 

 

If I understand correctly, then what you will want to do is "stabilize" the name of the components in the browser so that when you copy the assembly, the names in the browser always match the occurrence names in the iLogic code.

 

image.png

 

CoolerQuantity = Parameter("NG-005:1", "CoolerQuantity")

 

Copied Assembly uses new copied part filesL

image.png

 

But now there is a problem with the code  because the name does not match:

CoolerQuantity = Parameter("NG-005:1", "CoolerQuantity")

 

The solution is to rename the components in the assembly browser :

image.png

 

Change the code to use the occurrence name 

CoolerQuantity = Parameter("Cooler", "CoolerQuantity")

 

Now when you copy the assembly and parts, the browser name will not change and the iLogic code will not have errors or need to be changed by hand:

image.png

 

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

EESignature

Message 7 of 7

Mirtchii
Advocate
Advocate

Dear All,

 

Mr. Curtis's solution is exactly what i need. I tried and it works perfectly.

Although in our company work flow, the part name and the file name must be the same.

But i will tell my boss about this solution, if he approves, all the time consuming job will be over.

Really appreciate all your help, especially Mr. Curtis for such a detailed explanation.

 

Mirt.

0 Likes