Jump to content

Drop Down list


AlanW

Recommended Posts

Hi, Playing with a cabinet with a dropdown list for selecting the width.

Dropdown is ok when drawing a circle as it seems to take the number, but put it into a larger network and it gets an error.

Any ideas?

Thanks

So solved it by placing an int node after the dropdown.

Bus still is there a way to setup a dropdown with just integers.

Thanks

Cabinete_03 file has the wrapped network which seems to work fine.

Using a standard manufacturer as the base so standard widths.

Edited by Alan Woodwell
Link to comment

Hi Alan,

Try this revised version of the Dropdown Node. It tests if the output is a number or a string and gives appropriate output.

(As far as I can tell the Dropdown code is designed for strings, so the only way to get something other than a string is to convert it, which is what the float() command does.)

Kevin

Edited by Kevin McAllister
Link to comment

Hi,

Further advancements on the Kitchen Cup'd base items for modelling a kitchen based on a standard suppliers unit sizes.

The various cabinets have multiple sizes that you can choose so copy one and adjust sizes and build the kitchen.

Will do the doors, benchtop and all the other parts like drawers etc.

You can see how this works and make your own base units.

HTH

Link to comment
Kevin,

Thanks for this, it works a treat. Was struggling how to make it output and integer so now this is great.

Also appears to work with int()

Hi Alan,

Glad to help. I'm curious why you need the output specifically be an integer? Isn't that defined by the the list of choices you give the user? If someone else tried to use your the node for a list such as [10.5,11.7,12.9...] the node would pass those through as strings rather than numbers because their choice would fail the Int() test.

Kevin

Link to comment

No reason, was just seeing what would it would accept, float would be more flexible.

In this Exercise I am limiting the user to a standard set of Supplier units.It should be easy for users to make it flexible as all they have to do is add the name to the node and they can make them any size they want.

Have added a 2 Drawer unit to this file.

The drawer fronts and doors will go on as a separate choice option.

Basing this exercise on the following supplier.

http://www.kaboodle.com.au/select

Edited by Alan Woodwell
Link to comment
  • 1 month later...
  • Marionette Maven

Here's the 2016 version of what I've included in 2017.

It's the Popup List in its simplest form. This node will return an integer corresponding to the location in the list that is chosen, starting with 0.

 

Without editing the script, this means that 'choice 1' returns 0, 'choice 2' returns 1, and 'choice 3' returns 2.

 

There are many ways to modify the functionality of this node. If you're looking to just keep it simple, I would suggest only modifying the contents of the list and just returning the corresponding integers.

 

If you'd like the node to perform a different action depending on the selection in the list instead of returning integers, I can help you with this if you get stuck. Just give me an idea of what you want to do and I can help you out.

 

Hope this helps!

marionettePopupListNode_v2016.vwx

Link to comment
  • Marionette Maven

Is this list always going to be the same, or will it be changing often?

 

One of the current limitations of OIP controls is that they cannot be dynamically updated. Because of this, it could be a little more work to make sure your object works as intended.

 

If your list won't change, you can absolutely make this work without too much work. But if it will be changing, I can run you through the steps to *hopefully* make it at least somewhat reliable.

 

As for attaching a spreadsheet/txt file, yes, this is possible, but will require slightly more work, and this will still be limited by the OIP not dynamically refreshing.

Link to comment

Hi, This attached Network/worksheet controls the output and changes the object sizes. Did this a while ago and needs to be re networked but the principle works.

Have a spreadsheet with all your data and have it generate the drawing. You need to have a way to update the object so i place a drop down node and all you have to do is re-select it and it updates the network. Will rework this into something that I think may assist.
HTH

traveling, this network may not have the dropdown on, will fix and add it in. 

 

 

Control By Worksheet_001v2016.vwx

Control By Worksheet_001v2016+ Object.vwx

Edited by Alan Woodwell
  • Like 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...