Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iLogic; iPart custom column value setting

6 REPLIES 6
SOLVED
Reply
Message 1 of 7
ygingras
3416 Views, 6 Replies

iLogic; iPart custom column value setting

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

6 REPLIES 6
Message 2 of 7
MjDeck
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
Autodesk, Inc.

Message 3 of 7
ygingras
in reply to: MjDeck

Thanks!

Message 4 of 7
Carthik_Babu
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@yahoo.co.in ,
https://grabcad.com/carthik-1/projects
"May all beings be happy" http://www.dhamma.org/
Tags (1)
Message 5 of 7
Carthik_Babu
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@yahoo.co.in ,
https://grabcad.com/carthik-1/projects
"May all beings be happy" http://www.dhamma.org/
Message 6 of 7
petestrycharske
in reply to: MjDeck

@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

Just a guy on a couch...

Please give a kudos if helpful and mark as a solution if somehow I got it right.
Message 7 of 7
MjDeck
in reply to: petestrycharske

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


Mike Deck
Software Developer
Autodesk, Inc.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report