Hi,
Does anyone know if it is possible to set the value of one or more "custom" column of an iPart row.
Per example woul this iLogic method work?
iPart.ChangeRow("iComponentName:1", "RowMemberName", customParam1, customParam2)
If so, could you demonstrate how to use it?
If not, would you have another suggestion?
Thanks in advance
Yves
Solved! Go to Solution.
Solved by MjDeck. Go to Solution.
Here's a workflow to demonstrate this function:
Create an iPart. Make one of the columns (sample name Width) into a custom column.
Save the iPart as CustomTest.ipt
Make 3 member rows in the table. These would by default have the Member names:
CustomTest-01
CustomTest-02
CustomTest-03
Create a new assembly. Place the iPart as a component in the assembly.
Create a numeric parameter named iPartWidth in the assembly. Set it to a value that is reasonable for your part.
Create a Text (or String) parameter named iPartMemberName in the assembly. Make it a multi-value parameter. Give it the list of values:
CustomTest-01
CustomTest-02
CustomTest-03
Note the name of the iPart component in your assembly Model browser. It will probably be CustomTest-01:1
Add this rule:
iPart.ChangeRow("CustomTest-01:1", iPartMemberName, iPartWidth)
Then you should be able to change the iPartMemberName and iPartWidth parameters, and the iPart component will update to show your changes.
If you manually change the row in the iPart table in the assembly, the component name may change. To keep the rule working, you should then rename the component (in the Model browser tree) to its original name CustomTest-01:1
You only have to rename it once, and then it will remain constant.
Hi,
Kindly download the zip file from the below link (since the file size is big).
http://grabcad.com/library/ilogic-ipart-and-imate-1
i found my logic does not Chaning custom column. Request you to kindly go through the code and tell me what type of bug is this...... or where i am going wrong
Note: Need suggestion to create icomposite for to "control angle of component placement".
@MjDeck, how do you determine which values get mapped where? Does it matter which order the columns are in the iPart table? For example, to borrow your example, what if I had two values I'm trying to map.
iPart.ChangeRow("CustomTest-01:1", iPartMemberName, iPartWidth, iPartLength)
How do we make sure that the Width and Length are mapped properly? Hope my question makes sense and I look forward to seeing your thoughts. Thanks in advance and have a most blessed day!
Peace,
Pete
@petestrycharske , you should supply the values in the same order as the columns appear in the iPart table. For instance, the order you're showing would work if the Width (or similar name) column occurred before the Length column in the table.
This is described briefly in the help.