Jump to content
Developer Wiki and Function Reference Links ×

Whats the right node?


spries

Recommended Posts

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 by spries
Link to comment

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?

  • Like 1
Link to comment
  • Marionette Maven

@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

  • Like 1
Link to comment
  • 3 months later...

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

Link to comment
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

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...