Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Using a User Parameter in a iPart inside of an assembly with an iLogic code to adjust the length of part.

cquinnG2EUS
Explorer

Using a User Parameter in a iPart inside of an assembly with an iLogic code to adjust the length of part.

cquinnG2EUS
Explorer
Explorer

I have a ipart in my assembly with a iLogic code to adjust the length of the iPart and I am getting the following error message

 

Error on line 1 in rule: Detail G1 Height Rule, in document: TM-SD.iam

Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))

 

The iPart has a user parameter "height in assembly"

once the iPart is placed and constrained in the assembly I create a user parameter in the assembly call "part height" then I create the iLogic and the code reads: Parameter("Part):1", "Height_in_Assembly") = Height_of_Part. I had this work previous in assemblies with non iPart .ipts. I also noticed that the iPart user parameters are like a new part and my user parameters are moved to linked parameters along with all the model parameters in the iLogic folder. any guidance to resolve this issue would be greatly appreciated.

0 Likes
Reply
321 Views
3 Replies
Replies (3)

A.Acheson
Mentor
Mentor

A few things are you completely set on continuing to use iParts? Could you do this with an iLogic driven part? The reason being they are harder to work with. Is the iPart length custom or is it a defined length. Are you using the member file or the factory file in your assembly? Please post some images of what files your working with and the ilogic code your using to control them.

 

If you have defined the length in the iPart factory table you can use the find row function to search for the parameter value then use change row to change the member by row number. 

 

i=iPart.FindRow("iChangedComponentName:1","Length", “=“,100)

 

iPart.ChangeRow("iChangedComponentName:1", i)

 

 

 

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

cquinnG2EUS
Explorer
Explorer

No I am not set on them, I was curious if I could make that iPart parameters work with iLogic. I am still very new with iLogic and all of it has been self taught so I am sure I could go that direction but wasn't sure how to get that parameter to feed the iPart. the iPart is to change the configuration of the part from a single hole to a double and quad. the length is complete custom, has the part moves up or down a steel pole the length is changed per the taper and diameter of the pole. for time sake I created separate parts and used the existing iLogic I created before. thank you. 

0 Likes

A.Acheson
Mentor
Mentor

This sounds like an ilogic part would work better for this. When a custom ipart is created it creates a brand new file from the factory and it is saved in a folder above the factory or wherever you choose. You can drive these  but the location  of the member file can be troublesome as well as controlling the filename itself.

 

Here is a simple example of adding a custom ipart member and changing its value after adding. 

 

Dim FullFileName As String = "C:\Custom iPart.ipt"

Dim componentA = Components.AddiPart("CustomPart", FullFileName, row := 1, position := Nothing, grounded := False, visible := True, appearance := Nothing)

iPart.ChangeRow("CustomPart", 1, 100)

 

Another method is ilogic part, you can link assembly parameter to ilogic part on placement. It still has the filenaming issue but is more flexible than a custom ipart. 

AAcheson_0-1665099260746.png

 

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