How to have a menu with internal integer values?

   1766   2   1
User Avatar
Member
131 posts
Joined: Oct. 2011
Offline
Hi,

In my custom OP, I am trying to create a named menu with items “Positive”, “Negative” and provide values like 1, and -1, respectively. I tried using an Integer item in the parameters tab of the Edit Operator Type properties dialog, with a defined menu and tokens with 1 and -1, but when I use it in the expressions, it doesn't work.

If I turn it into a float, it works but then I lose the menu,

Any ideas?



Thanks.
User Avatar
Member
168 posts
Joined:
Offline
could you provide an example ?
Albert
User Avatar
Member
131 posts
Joined: Oct. 2011
Offline
Thanks, here is a simple case that shows the problem. The line's distance is multiplied by my menu item value but it seems the value I get from the menu is the order of them (index), instead of my tokens.

Attachments:
custom_line.otl (2.9 KB)

  • Quick Links