iLogic to place iPart in an .iam file

iLogic to place iPart in an .iam file

nikolas_junioor7G4B3
Contributor Contributor
306 Views
3 Replies
Message 1 of 4

iLogic to place iPart in an .iam file

nikolas_junioor7G4B3
Contributor
Contributor

Hey everyone.
I have a iPart that was driven by 5 parameters: A, B, C, D and E.
Another iPart was driven by 2 of those parameters: A and B.

In both parts, A and B has the same value.
I'd like to make a rule that, throu a form, I choose those 5 values than, part A and part B that match those values are placed in the .iam.

0 Likes
307 Views
3 Replies
Replies (3)
Message 2 of 4

A.Acheson
Mentor
Mentor

Hi @nikolas_junioor7G4B3 

 

You can use the find row function and the change row function to perform this. 

Here is the sample from the ilogic help. All the functions are available in the ilogic editor.

This isn't the finished solution  but you can finish it out once you know how to find one column value. You will need to put multiple 

 

 

i=iPart.FindRow("iChangedComponentName:1","columnName", "<=",d1,"columnName","<=",d2)
iPart.ChangeRow("iChangedComponentName:1", 1)

 

 

If you need more assistance post the code along with a detail description of where you need help

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 4

nikolas_junioor7G4B3
Contributor
Contributor

I tried those functions but I don't understand what each statement does, so, it doesn't worked.
The HELP of inventor is a crap.
I tried this:

1° - I created variables A, B, C, D and E on User Parameters. This is OK;
2° - I created a form to change this parametes. This is OK too;
3° - I placed, manually, part A and part B on the assembly. Those two parts should be a set.

 

Then begun my hell with FindRow and ChangeRow ... do you have some exemple of use of this two funcitons?

0 Likes
Message 4 of 4

A.Acheson
Mentor
Mentor

Hi @nikolas_junioor7G4B3 

 

If you have the same column and it has the same value in each member it will only return the first value. if it cannot find a value it will return -1 so be sure to handle this. 

AAcheson_0-1694028341734.png

 

i = iPart.FindRow("Angle", "Dia", "=", Dia)
iPart.ChangeRow("Angle", i)

 

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