Jump to content

Recommended Posts

Hi, 

I need to switch between multiple inputs in SOP, I can use switch SOP node, but since I have many switch condition, I think it would way easier in vex (as opposed to having multiple switch nodes connected together). I could not find a vex function that switches between input, or am I missing something? 

Share this post


Link to post
Share on other sites

You could evaluate those conditions in a detail wrangle and then write an expression in the switch "Select input":

detail("../attribwrangle1/","result",0)

It references the result of the wrangle.

switch.PNG

 

Compilable solution, using spare input:

 

switch-compilable.png

switch-compilable.hiplc

Edited by ikoon
  • Thanks 1

Share this post


Link to post
Share on other sites

My very first post on ODForce.   :)
Thanks Polvy ...
I extended your selector for string based selection  (using multiple concatenated string menus) .   (note wont work with normal ordered menu as it seems the token evaluates to a number regardless). 

A nice aspect is it keeps my flow in readable form .. ( nb.  case and typo sensitive)
Could easily do this with some VEX in a wrangle but for some this might be helpful.  

 

 

selector_StringTypes_02.hiplc

  • Like 2

Share this post


Link to post
Share on other sites
 
 
 
 
 
 
 
 
 
7
On 2/13/2019 at 7:28 PM, Benra said:

My very first post on ODForce.   :)
Thanks Polvy ...
I extended your selector for string based selection  (using multiple concatenated string menus) .   (note wont work with normal ordered menu as it seems the token evaluates to a number regardless). 

A nice aspect is it keeps my flow in readable form .. ( nb.  case and typo sensitive)
Could easily do this with some VEX in a wrangle but for some this might be helpful.  

 

 

selector_StringTypes_02.hiplc

I am actually interested in how you went about creating that selector node. Do/can you somehow attach a script to it, or how do you go about changing/adding on to what the default null node does? I am not quite sure if there is a term for what you did, so I am not sure exactly what to try and research, lol.

Share this post


Link to post
Share on other sites

I got it figured out over the weekend. Pretty nice how many different ways there are to go about making things do neat things, lol.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×