spries Posted June 8, 2021 Share Posted June 8, 2021 (edited) I have a selection of 7 angles. (-7.5°, -5.0°, -2.5°, 0.0°, 2.5°, 5.0° and 7.5°) I want the user to be able/required to pick one of the angles and that becomes the input value for the "Symbol nAngle" What I tried so far, "SLIDER" only takes integers as input values, same for "Popup" list. "Ordered List" gives me 7 iterations as a result of 7 input values in the list. Keep in mind I'm a Marionette rookie, so take it easy and keep it simple. Thanks, Stef Edited June 8, 2021 by spries Quote Link to comment
Jesse Cogswell Posted June 9, 2021 Share Posted June 9, 2021 The way I've done it before is to have a Popup node with the number of choices (which requires editing the coding of the node to include your choices by double clicking the node and removing the top two lines of code, then filling in the appropriate choices), which then is used in conjunction with a List node which contains the actual angle values using Real input nodes. This List node then plugs in to a Get Item node in the "list" input, with the Popup node going into the "iIndex" input. The Get Item node's "item" output then would plug into the Symbol node's "nAngle" input. Does this make sense? 1 Quote Link to comment
Marionette Maven Marissa Farrell Posted June 10, 2021 Marionette Maven Share Posted June 10, 2021 @spries I'm attaching a file with a modified Popup node. It will output the value chosen by the user. The lines that are modified: 13 - defines the list of options 14 - displays the list in 13 for the values in the Popup 30 - gets the selected item from the values in line 13 as defined by the result of the selection in 14, then converts it from string to float for numerical operations. I hope this helps! It's very similar to how Jesse described his method, but avoids the spaghetti mess of placing all of those nodes. moddedPopupNode.vwx 1 Quote Link to comment
spries Posted June 11, 2021 Author Share Posted June 11, 2021 Thanks Marissa. I am either blind or don't know how to work the web page, but I don't see the attached file. Quote Link to comment
STA Posted September 28, 2021 Share Posted September 28, 2021 I am currently working on something similar and have two questions: 1) Are the modifications really necessary? I just put the list of options in the square brackets whiche are there by default, where you put the optios variable. 2) Is there any way to use a comma for decimals? So 0,5 instead of 0.5, which is the German way to write decimal numbers. Unfortunately at the moment when I use the comma, it seperates the two numbers, making it two unique options in the dropdown, although the comma is inbetween the two apostrophes. Thanks in advance Sebastian Quote Link to comment
Antonio Landsberger Posted September 30, 2021 Share Posted September 30, 2021 On 9/28/2021 at 10:49 AM, STA said: I am currently working on something similar and have two questions: 1) Are the modifications really necessary? I just put the list of options in the square brackets whiche are there by default, where you put the optios variable. 2) Is there any way to use a comma for decimals? So 0,5 instead of 0.5, which is the German way to write decimal numbers. Unfortunately at the moment when I use the comma, it seperates the two numbers, making it two unique options in the dropdown, although the comma is inbetween the two apostrophes. Thanks in advance Sebastian Hi Sebastian, I have reported this behaviour already and I have verified the fix for Vectorworks 2022 SP0. Regards, Antonio Quote Link to comment
Recommended Posts
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.