Inventor General

Reply
Member
Posts: 17
Registered: ‎11-13-2006
Message 1 of 7 (1,011 Views)
Accepted Solution

iLogic Multivalue Parameter

1011 Views, 6 Replies
07-24-2012 03:29 AM

Hi All, do you know how to populate an Inventor Multivalue PARAMETER using a For cycle in iLogic according to a variable index corresponding to a different number of array items?

for example:

i grab some data from a Rule and populate an Arraylist variable. I trace the number of instances using a counter. after the data acquisition I want to populate the Multivalue Parameter with the acquired values.

No problem browsing the Arraylist parameter: MyArraylist.(Index)... but what about the Multivalue parameter?

the MultiValue.SetList("Multivalue Parameter", Value 1, Value 2, ... , Value N) provide a defined number of data and cannot be set dynamically according to an Index.

thank you in advance

 

Active Contributor
Posts: 29
Registered: ‎07-17-2012
Message 2 of 7 (989 Views)

Re: iLogic Multivalue Parameter

07-24-2012 07:25 AM in reply to: matteo.pallaroni

Out of my breif knowledge I would suggest you can use another Array, populate that and then send it to the paramer.

i.e.

 

' Your extracted value

Dim MyOriginalArray as New ArrayList

 

MyOriginalArray = .......

 

'Declare an arbitrary array

Dim lstSecond as New ArrayList

 

' filter out as however you would like

For i = 1 to 10

  

      lstSecond.add(MyOriginalArray.item(i))

 

Next i

 

'Populate the paramter

 

Multivalue.List(YourParameter") = lstSecond

 

 

Hope this helps

 

 

Member
Posts: 17
Registered: ‎11-13-2006
Message 3 of 7 (975 Views)

Re: iLogic Multivalue Parameter

07-24-2012 08:27 AM in reply to: matteo.pallaroni

Multivalue.List("MyParameter") = ArrayList was exactly what I was missing. It works perfectly without any cycle for filling in all he values and it depends on how many values are stored into ArraList.

Great, Thank you!

Member
Posts: 3
Registered: ‎03-10-2014
Message 4 of 7 (138 Views)

Re: iLogic Multivalue Parameter

03-10-2014 11:45 AM in reply to: matteo.pallaroni

Can I add new values immediatelly to Multivalue without creating array ?

Member
Posts: 17
Registered: ‎11-13-2006
Message 5 of 7 (120 Views)

Re: iLogic Multivalue Parameter

03-11-2014 02:38 AM in reply to: S_Kornilov

yes of course; the default string definition is explicit; you decide which are the values and the position in the list:
MultiValue.SetList("test", 0.5, 0.75, 1.0, 1.25)
test is your numeric or text parameter within Inventor

Member
Posts: 3
Registered: ‎03-10-2014
Message 6 of 7 (105 Views)

Re: iLogic Multivalue Parameter

03-11-2014 06:53 AM in reply to: matteo.pallaroni

And how I can add fifth parameter 1.5 ?

For example, I want to add new values in cycle
and don't know about their quantity

 

Member
Posts: 3
Registered: ‎03-10-2014
Message 7 of 7 (94 Views)

Re: iLogic Multivalue Parameter

03-11-2014 10:49 AM in reply to: matteo.pallaroni

Sorry, quality, of course

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you interested in helping shape the Autodesk Community?
We’re looking at a few different ways to improve the “All Forums” landing page and need your feedback! If interested, please take a few minutes to fill out the following Usability Study. Thank you for your time!

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community


Inventor Exchange Apps

Created by the community for the community, Autodesk Exchange Apps for Autodesk Inventor helps you achieve greater speed, accuracy, and automation from concept to manufacturing.

Connect with Inventor

Twitter

Facebook

Blogs

Pinterest

Youtube