Inventor General Discussion

Inventor General Discussion

Reply
Active Contributor
ygingras
Posts: 26
Registered: ‎03-09-2007
Message 1 of 5 (1,291 Views)
Accepted Solution

iLogic; iPart custom column value setting

1291 Views, 4 Replies
12-03-2010 09:45 AM

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

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.

 

Employee
MjDeck
Posts: 959
Registered: ‎02-24-2009
Message 2 of 5 (1,265 Views)

Re: iLogic; iPart custom column value setting

12-03-2010 05:20 PM in reply to: ygingras

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.

 



Mike Deck
Software Developer
DLS - Mechanical Design
Autodesk, Inc.

Active Contributor
ygingras
Posts: 26
Registered: ‎03-09-2007
Message 3 of 5 (1,230 Views)

Re: iLogic; iPart custom column value setting

12-07-2010 08:49 AM in reply to: MjDeck

Thanks!

Distinguished Contributor
Carthik_Babu
Posts: 121
Registered: ‎01-29-2013
Message 4 of 5 (560 Views)

Re: iLogic; iPart custom column value setting

06-04-2013 05:43 AM in reply to: ygingras

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".

 

 

Carthik Babu M.S, Asst Manager - Machine Building,
Gabriel India Ltd,Hosur, TN, INDIA
Email:carthik.ms@gabriel.co.in ,
https://grabcad.com/carthik-1/projects
"May all beings be happy" http://www.dhamma.org/
Distinguished Contributor
Carthik_Babu
Posts: 121
Registered: ‎01-29-2013
Message 5 of 5 (538 Views)

Re: iLogic; iPart custom column value setting

06-06-2013 10:42 PM in reply to: MjDeck
Hi Mike,
Can you check my issue. by downloading my ilogic assembly
http://grabcad.com/library/ilogic-ipart-and-imate-1
and ping me if you find, where i am going wrong....in handling custom column
Carthik Babu M.S, Asst Manager - Machine Building,
Gabriel India Ltd,Hosur, TN, INDIA
Email:carthik.ms@gabriel.co.in ,
https://grabcad.com/carthik-1/projects
"May all beings be happy" http://www.dhamma.org/
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.