Changing iPart with iLogic

Changing iPart with iLogic

Nauld1
Enthusiast Enthusiast
1,130 Views
3 Replies
Message 1 of 4

Changing iPart with iLogic

Nauld1
Enthusiast
Enthusiast

So I wrote the Following iLogic:

 

If Crosstie_Depth = True And UG_Height = 132 in Then
iPart.ChangeRow("ML2005_iAssembly:5", "ML2005_iAssembly-01")
End If
If Crosstie_Depth = True And UG_Height = 168 in Then
iPart.ChangeRow("ML2005_iAssembly:5", "ML2005_iAssembly-05")
End If
If Crosstie_Depth = True And UG_Height = 192 in Then
iPart.ChangeRow("ML2005_iAssembly:5", "ML2005_iAssembly-09")
End If
If Crosstie_Depth = False And UG_Height = 132 in Then
iPart.ChangeRow("ML2005_iAssembly:5", "ML2005_iAssembly-03")
End If
If Crosstie_Depth = False And UG_Height = 168 in Then
iPart.ChangeRow("ML2005_iAssembly:5", "ML2005_iAssembly-07")
End If
If Crosstie_Depth = False And UG_Height = 192 in Then
iPart.ChangeRow("ML2005_iAssembly:5", "ML2005_iAssembly-11")
End If

It's supposed to change the height of a post and the spacing of holes on the post based on set parameters. There doesn't seem to be any errors with the program itself, but when I change my parameters the iPart won't change. Anyone have any ideas why?

0 Likes
1,131 Views
3 Replies
Replies (3)
Message 2 of 4

Curtis_Waguespack
Consultant
Consultant

Hi Nauld1,

 

It's hard to say for certain without seeing the files, but I noticed this in the documentation:

 

Use iPart and iAssembly functions to drive iPart and iAssembly configurations in an assembly. You can use a rule to change the current configuration of an iPart or iAssembly based on the conditions and logic you define. These functions work for iAssemblies in the same way as they do for iParts, except that custom parameters can only be used for iParts. To use the function for an iAssembly, you can optionally substitute iPart with iAssembly when specifying the function.

 

https://knowledge.autodesk.com/support/inventor-products/learn-explore/caas/CloudHelp/cloudhelp/2014...

 

I'm guessing that Crosstie_Depth would be a custom parameter?

 

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

EESignature

Message 3 of 4

Nauld1
Enthusiast
Enthusiast

No it's just a true/false parameter that I've used to define the use of either a 10in deep crosstie or a 14in deep crosstie. I don't have any custom parameters at this point.

0 Likes
Message 4 of 4

Curtis_Waguespack
Consultant
Consultant

Hi Nauld1,

 

I'm not sure that the parameter type is the issue, so keep that in mind, but I think there are 2 categories of parameters:

 

  • Model Parameters
  • User Paramters ( aka Custom Parameters )

 

If you edit your iAssembly table and look at the Parameters tab, do you see the crosstie paramter listed in the Other folder? When I check on a simple iassembly, I don't see True / False parameters showing up.

 

Again, this might not be the issue, but it's something to rule out, maybe.

 

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

EESignature

0 Likes