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

    Autodesk Inventor

    Reply
    *Expert Elite*
    Posts: 5,608
    Registered: ‎12-01-2004
    Accepted Solution

    ilogic form dropdown?

    1091 Views, 12 Replies
    08-01-2012 06:06 AM

    Can you have dropdowns in an ilogic FORM?

    For example I want to setup 5 choices for a custom iproperty. Then when I run the form I can pick from those 5 choices only?

     

     

    Please click "Accept as Solution" if this response answers your question.
    -------------------------------------------------------------------------------------
    2012 Product Design Suite Ultimate
    Windows 7 64 bit
    90G OCZ SATA 3 SSD (My SSD is faster than your HDD)
    Core I7 920 processor, ATI HD6970 graphics card, 12G Corsair RAM


    Please use plain text.
    *Expert Elite*
    Mark_Flayler
    Posts: 1,455
    Registered: ‎07-30-2007

    Re: ilogic form dropdown?

    08-01-2012 06:17 AM in reply to: mcgyvr

    The way I have done it in the past is with a Custom Parameter that is Exported to be a Custom iProperty.  I use the Multi-value list from the parameter to drive the value of the Custom iProperty

    Mark Flayler Application Engineer - Manufacturing Solutions Division
    IMAGINiT's Manufacturing Solutions Blog:
    http://blogs.rand.com/manufacturing/
    Please use plain text.
    *Pro
    jletcher
    Posts: 1,384
    Registered: ‎05-18-2011

    Re: ilogic form dropdown?

    08-01-2012 06:23 AM in reply to: mcgyvr

    Yep you sure can Here is my form I am working on now.

     

    yep can.JPG


    Please mark this response as "Accept as Solution" if it answers your question.

    James Letcher
    2012 Factory Design Suite ( will not load 2013)
    What happen to my Inventor :-(
    Please use plain text.
    Mentor
    rhasell
    Posts: 201
    Registered: ‎05-23-2007

    Re: ilogic form dropdown?

    08-01-2012 04:23 PM in reply to: jletcher

    Hi

    How did make columns in your form?

     


    Reg

    Autodesk Product Design Suite Premium 2014 Build 170
    Intel Core i7 (950@3.07GHz)
    Windows 7x64 (Home) - 12GB Ram
    Nvidia GeForce GTX 560 Ti (1Gig - Ver:314.07)
    Please use plain text.
    Distinguished Mentor
    Posts: 728
    Registered: ‎07-26-2007

    Re: ilogic form dropdown?

    08-01-2012 09:47 PM in reply to: Mark_Flayler

    Mark, how do you export a multi-value text parameter?

    Please mark as "Accept as Solution" if it answers your question or "Kudos" if you found it useful.
    ---------------------------------------------------------------------------------------------------------------------
    Stew, AICP
    Inventor Professional 2013, Autodesk Simulation Multiphysics 2013
    Windows 7 x64 Core i7 32GB Ram FX2000
    Please use plain text.
    *Expert Elite*
    Mark_Flayler
    Posts: 1,455
    Registered: ‎07-30-2007

    Re: ilogic form dropdown?

    08-02-2012 03:39 AM in reply to: mcgyvr

    Actually I misspoke, I use an ilogic rule to copy the value of the MultiValue parameter to the value of the custom iproperty.  There is no export on the MultiValue parameters.

    Mark Flayler Application Engineer - Manufacturing Solutions Division
    IMAGINiT's Manufacturing Solutions Blog:
    http://blogs.rand.com/manufacturing/
    Please use plain text.
    Distinguished Mentor
    Posts: 728
    Registered: ‎07-26-2007

    Re: ilogic form dropdown?

    08-02-2012 03:48 AM in reply to: Mark_Flayler

    Would you mind sharing this code?

    Please mark as "Accept as Solution" if it answers your question or "Kudos" if you found it useful.
    ---------------------------------------------------------------------------------------------------------------------
    Stew, AICP
    Inventor Professional 2013, Autodesk Simulation Multiphysics 2013
    Windows 7 x64 Core i7 32GB Ram FX2000
    Please use plain text.
    *Expert Elite*
    Curtis_Waguespack
    Posts: 1,988
    Registered: ‎03-08-2006

    Re: ilogic form dropdown?

    08-02-2012 05:01 AM in reply to: mcgyvr

    Hi everyone,

     

    You can use MultiValue.SetList to add values and convert a parameter to a multi-value parameter.

     

    Here's a quick example.

    There is a sketch dimension / parameter called Length.

    There is a rule with this line of code.

     

    MultiValue.SetList("Length", 100, 150, 200, 250)

    Autodesk Inventor Set List Ilogic.PNG

     

    There is a form set up like this:

     

    Autodesk Inventor Form List Ilogic.PNG

     

    Autodesk Inventor Form List 2 Ilogic.PNG

     

    Attached is the example file (Inventor 2013)

     

    I hope this helps.
    Best of luck to you in all of your Inventor pursuits,
    Curtis
    http://inventortrenches.blogspot.com



      solution.png  Did you find this reply helpful ? If so please use the Accept as Solution or  Kudos button below.

    Please use plain text.
    *Expert Elite*
    Curtis_Waguespack
    Posts: 1,988
    Registered: ‎03-08-2006

    Re: ilogic form dropdown?

    08-02-2012 05:52 AM in reply to: mcgyvr

    Hi mcgyvr,

     

    You could also add a few lines to expose (export) the parameter value as a property. So using the previous example you set the Length using a form, and this code sets the list and ensures the parameter is exported as a custom iProperty.

     

    'set list of values
    MultiValue.SetList("Length", 100, 150, 200, 250)
    Dim oLength As Parameter
    oLength = Parameter.Param("Length")
    oLength.ExposedAsProperty = True

     

    But if you need the parameter value to be written to a custom iProperty that is not the same name as the parameter you could use something like this. In this example a custom iProperty called L1 is created or reused, depending if it exists. And the Length parameter value is written to it:

     

    'set list of values
    MultiValue.SetList("Length", 100, 150, 200, 250)
    
    Dim propertyName1 As String = "L1"
    
    'define custom property collection
    oCustomPropertySet = ThisDoc.Document.PropertySets.Item("Inventor User Defined Properties")
    
    Try
    'set property value
    oProp = oCustomPropertySet.Item(propertyName1)
    Catch
    ' Assume error means not found so create it
    oCustomPropertySet.Add("", propertyName1)
    End Try
    
    'set custom property value
    iProperties.Value("Custom", "L1") = Length

     

    I hope this helps.
    Best of luck to you in all of your Inventor pursuits,
    Curtis
    http://inventortrenches.blogspot.com



      solution.png  Did you find this reply helpful ? If so please use the Accept as Solution or  Kudos button below.

    Please use plain text.
    *Expert Elite*
    Posts: 5,608
    Registered: ‎12-01-2004

    Re: ilogic form dropdown?

    08-02-2012 06:22 AM in reply to: Curtis_Waguespack

    iproperty NOT parameter

     

    I just want a form with a drop down to fill in the value of a custom iproperty.

    Currently I'm doing it with an "Input Box" rule which is fine but not as pretty as I could make a form.

     

    Seems totally silly to me this isn't build into ilogic forms already..

     

    It should be as simple as this.. See attached

    Please click "Accept as Solution" if this response answers your question.
    -------------------------------------------------------------------------------------
    2012 Product Design Suite Ultimate
    Windows 7 64 bit
    90G OCZ SATA 3 SSD (My SSD is faster than your HDD)
    Core I7 920 processor, ATI HD6970 graphics card, 12G Corsair RAM


    Please use plain text.