sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Select From List Problems

    Scheduled Pinned Locked Moved Dynamic Components
    sketchup
    3 Posts 2 Posters 330 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      hocha
      last edited by

      Hi All -

      I'm adding various attributes to my dynamic components and am having trouble getting the "Select From List" to work properly. When I select certain options (but not all options), then hit apply, the selection automatically reverts to a different selection. For example, when I select "Electrical - Other" (see below for list of options and values), and then hits apply, the selection automatically changes to "Civil - Asphalt".

      The algorithm that references these values them becomes incorrect. Does anyone know what is going on and/or have suggestions on how to rectify?

      Below is my particular list of options and corresponding values:

      Electrical - VFD / 15
      Electrical - Other / 20
      Electrical - Controls / 25
      Electrical - Motor / 30

      Mechanical - Other (15) / 15
      Mechanical - Other (20) / 20
      Mechanical - Other (25) / 25
      Mechanical - Pumps / 30
      Mechanical - Valves / 30

      Civil - Asphalt / 20
      Civil - Steel (Corrosive) / 30
      Civil - Other (Corrosive) / 35
      Civil - Concrete (Corrosive) / 50
      Civil - Pressurized Pipes (Corrosive) / 50
      Civil - Steel / 60
      Civil - Pressurized Pipes / 60
      Civil - Other / 75
      Civil - Stainless Steel / 100
      Civil - Concrete / 100

      1 Reply Last reply Reply Quote 0
      • H Offline
        hocha
        last edited by

        I mis-spoke in my original posting. After playing around for a while, I found that the "option" that I chose and the option that was automatically reverted to had the same values. It turns out that each option must have a unique value - otherwise the option chosen by the user may not show up correctly. Other than changing each value to a unique number (which I have done for the meanwhile) does anyone know how to have the same value for multiple options?

        1 Reply Last reply Reply Quote 0
        • DareDevilD Offline
          DareDevil
          last edited by

          In the "select from list" function, the "value" is something between value and index. This value must be unique but can be anything, number, text or function.
          I think about two ways to correct your problem :

          • Dirty but easy way: Play with the INT function
            In your list, just use a decimal value to make each value unique and when you use the value just ad INT(value). The "Electrical - Other" value can be 20.1 and "Civil - Asphalt" can be 20.3 so they're unique, but is you ask the INT of them they return 20 as you want. Of course, that works if you only need integer values...
          • Cleaner but indirect way: Use a CHOOSE and OPTIONINDEX
            In the list, use a unique value for each to avoid the error, but this value doesn't mind. To have a value, use the OPTIONINDEX function to return the position in the list and use the CHOOSE function to give the value you need.
            In this case, the function must be something like that :
            %(#000000)[= CHOOSE ( OPTIONINDEX ("list"), 15, 20, 25, 30, 15, 20....)]
            This is a little harder to modify, because if you want to ad an item in the list or re-order the list, you must change carefully the CHOOSE function.
          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          Buy SketchPlus
          Buy SUbD
          Buy WrapR
          Buy eBook
          Buy Modelur
          Buy Vertex Tools
          Buy SketchCuisine
          Buy FormFonts

          Advertisement