• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Discussion Groups

    Autodesk Inventor

    Reply
    Member
    Posts: 4
    Registered: ‎11-13-2006
    Accepted Solution

    iLogic Multivalue Parameter

    426 Views, 2 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

     

    Please use plain text.
    Active Contributor
    Posts: 26
    Registered: ‎07-17-2012

    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

     

     

    Please use plain text.
    Member
    Posts: 4
    Registered: ‎11-13-2006

    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!

    Please use plain text.