Itoo Software Forum

Author Topic: Expression checking  (Read 5357 times)

arch3d

  • Sr. Member
  • ****
  • Posts: 288
    • arch3d.pl
Expression checking
« on: February 23, 2025, 10:32:20 AM »
Hi

I would like to perform checking if XMarkerID is equal to one of values from array: 2,5,8,11,14,17...etc.

Any suggestion how to do it via expression?

if(XMarkerID==............ ,Input1,Input2);

Thanks for any help.

Dragan

  • Hero Member
  • *****
  • Posts: 1472
Re: Expression checking
« Reply #1 on: February 23, 2025, 11:40:38 AM »
It should work with ValueList.
I don't have access to 3dsmax at the moment to try this:

1. Add ValueList and create your array
2. Export Index parameter for the Value List. Use SegmentXCounter for this index.
3. Use this as Input1 in your expression

Dragan

  • Hero Member
  • *****
  • Posts: 1472
Re: Expression checking
« Reply #2 on: February 23, 2025, 11:22:02 PM »
Well, it should work if that is what you need.

I added another RC Annotation to display various data such as Dimensions, Spline IDs, SegmetXCounter, MarkerID values, and Vertices numbers...
Please let me know if you need something more.





arch3d

  • Sr. Member
  • ****
  • Posts: 288
    • arch3d.pl
Re: Expression checking
« Reply #3 on: February 24, 2025, 07:27:10 AM »
Hi Dragan,
Nice to see you again:)
Ill try, but as i think correct in such case I shoud type elements of the list maually, and not expose all nubers form array.

Btw for dimmensionsion i used ceil Operator because i get vaiues from Marker Data.

Many thanks for help!
« Last Edit: February 24, 2025, 07:50:00 AM by arch3d »

arch3d

  • Sr. Member
  • ****
  • Posts: 288
    • arch3d.pl
Re: Expression checking
« Reply #4 on: February 24, 2025, 07:42:55 AM »
It should work with ValueList.
I don't have access to 3dsmax at the moment to try this:

1. Add ValueList and create your array
2. Export Index parameter for the Value List. Use SegmentXCounter for this index.
3. Use this as Input1 in your expression

Miss this reply, yea this shoud work

Many thanks

Dragan

  • Hero Member
  • *****
  • Posts: 1472
Re: Expression checking
« Reply #5 on: February 24, 2025, 08:09:53 AM »
Ah, yeah... I forgot there is a password on the RC Annotation object. Sorry  ;)

@ everyone pass: topgun

The main staff is the Macro, which generates a number mesh on the output. You can input any number mesh using numeric input, box input is just for the decimal separator.
I have exposed some parameters too...
important note: if you are about reusing some of my macros the main generator must be named "Master"

Please let me know if you need some more info or additions to preset.





 
« Last Edit: February 24, 2025, 08:15:40 AM by Dragan »

arch3d

  • Sr. Member
  • ****
  • Posts: 288
    • arch3d.pl
Re: Expression checking
« Reply #6 on: February 24, 2025, 08:18:26 AM »
Thanks!

And it seems take only first element of array in my case :(
« Last Edit: February 24, 2025, 08:21:22 AM by arch3d »

Dragan

  • Hero Member
  • *****
  • Posts: 1472
Re: Expression checking
« Reply #7 on: February 24, 2025, 08:28:30 AM »
You need to connect the arithmetic operator to the index parameter:
Arithmetic expression:

return
Segment X counter;

Dragan

  • Hero Member
  • *****
  • Posts: 1472
Re: Expression checking
« Reply #8 on: February 24, 2025, 08:31:58 AM »

Btw for dimmensionsion i used ceil Operator because i get vaiues from Marker Data.

Many thanks for help!

You can use Macro for this too, just add my MasterOverrideMarker to Input and set which MarkerData you are using (0-8).
 

arch3d

  • Sr. Member
  • ****
  • Posts: 288
    • arch3d.pl
Re: Expression checking
« Reply #9 on: February 26, 2025, 02:52:38 AM »
Thank You!!!

Dragan

  • Hero Member
  • *****
  • Posts: 1472
Re: Expression checking
« Reply #10 on: February 26, 2025, 06:41:43 AM »
 :D  Glad to help