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 1

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

×