Command with multiple CommandStyles

Hello!

Is it possible to use more than one CommandStyle somehow?
I would like my command to have ScriptRunner and DoNotRepeat styles. :slight_smile:

It would be something like:

[CommandStyle(new[]{Style.ScriptRunner, Style.DoNotRepeat})]
public class MyCommand: Command
    {...

Thank you! :blush:

https://developer.rhino3d.com/api/RhinoCommon/html/T_Rhino_Commands_Style.htm

is a bitwise mask.
use
|
“logic or” to combine
Style.ScriptRunner | Style.DoNotRepeat

check für bitwise operators, google or this
check for bit mask … if you find a really nice tutorial, post a link - i did not find a nice one in my first, fast search.

hope this helps - kind regards -tom

2 Likes

Amazing, I missed that in the documentation :slight_smile:

Thank you Tom!