Edit parts of subassembly with Ilogic forms

Edit parts of subassembly with Ilogic forms

mantogirardi
Explorer Explorer
464 Views
4 Replies
Message 1 of 5

Edit parts of subassembly with Ilogic forms

mantogirardi
Explorer
Explorer

I am developing a parametric model, which consists of an assembly with some subassemblies inside. The ideal would be to have in the main assembly a form that allows me to select which parts of the subassemblies I want to delete or add according to the configuration, in addition to their dimensional change (this last one is actually working). If anyone can help me with this, that would be great. Thank you!

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

A.Acheson
Mentor
Mentor

Hi  @mantogirardi welcome to the forum. 


Could you provide a bullet point list of changes you want to make to the sub assembly? Some images of the process too. The task as you describe is very broad and there is many ways to approach this. Adding parts to sub assemblies can be a difficult process with only ilogic so you may need to use the API to solve this. 

Have you made an attempt at starting? If so please provide what you have.

 

If your starting out I suggest you to go to the ilogic editor and click on the model browser name and right click and you can add the components. Here is a video that you can start to learn how that functionality works. 

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 5

mantogirardi
Explorer
Explorer

Sin título-1.pngThanks Alan, I'll show you what I need.

I have this iAssembly with 10 configurations, each made by 2 sub-iAssembly with 10 configurations combined. Then, there is the form beside. What I need, is to change the parameter "MODULOS" in the Form, so that each option activates one of the 10 configs. of the iAssembly. Then, if i choose, for example "modulos = 2" i have to indicate the distance between iParts of each sub-iAssembly (this last one is actually working well). What I cannot do, is to call the configuration of the iAssembly. This is my code:

 

'Distance between components of sub-iAssemblys
Parameter("Estructura Aluminio-01:1", "ME1") = Modulo_1
Parameter("Chasis-01:1", "MC1") = Modulo_1 - 25

Parameter("Estructura Aluminio-01:1", "ME2") = Modulo_2
Parameter("Chasis-01:1", "MC2") = Modulo_2

Parameter("Estructura Aluminio-01:1", "ME3") = Modulo_3
Parameter("Chasis-01:1", "MC3") = Modulo_3

Then, for activating some of each configs, i'm trying to use  

iPart.ChangeRow("iParentFileName:1", "rowName")

but I can't call directly one of the configs from the table. I hope you understand what I want to ask, feel free to ask me again.

 

Thank you so much

 

0 Likes
Message 4 of 5

A.Acheson
Mentor
Mentor
Accepted solution

The first thing you need to do when placing in an iassembly/iPart is to normalize the occurrence name(“Chasis:1”). See article here. Give it a standardized name such as “Chasis”. This is now your assembly references this component and can reach the file name. If you change the member this reference name remains the same even thou the filename will now be different. You will notice without this change that the occurrence name will change based on the member/filename and then your code has nothing to reference. 

Next you can use iPart.findrow function to find a row in your table based on the parameters your looking for. See Help file here. 
Once you find the row , then supply the row number to the ipart.change more function. 

So this works much the same has how you manually select a row. Scan the table and find the matching parameters then change the row. 

 

Dim Row as Integer = iPart.FindRow("Chasis", "Thread_Diameter", ">=", 0.45, "Thread_Length", ">=", 2.0)
iPart.ChangeRow("Chasis", Row)

 For iAssembly switch iPart for iAssembly

Dim Row as Integer = iAssembly.FindRow("Chasis", "Thread_Diameter", ">=", 0.45, "Thread_Length", ">=", 2.0)
iAssembly.ChangeRow("Chasis", Row)

 

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 5

mantogirardi
Explorer
Explorer

Thank You so much! it worked perfectly!!

0 Likes