Run command in other command


#1

Hi,

I have a function that requires the user to click some positions. It is possible for the user to use '_RotateView while clicking. Now I thought it was also possible to click my custom views functions while using this command.

Why is does these not work? BeginCommand is not called with my functions but is with the RotateView.
Do I need to set something to make a function work in other commands?

Thanks for reading.


#2

Hi jordy,

Maybe here (points 12 and 13) you can find something useful to move rotate/pan/zoom your view with the keyboard, then you’ll have your mouse free to click anywhere you need. The disadvantage of doing it this way is the stepping movement of the camera throught the arrows control… There must be a way to change the step values in order to make this movement more fluent, but I couldn’t tell right now… I’m asking here

Another option is to get an space navigator… that obviously depends on how often/lucratively you use Rhino or any other 3d software. There is no way back once you get used to this gadget!

Hope that helps.


#3

@Jordi_Perez thank you for your answer.

I found an answer myself.

I had to set CommandStyle to transparant so Rhino knows it is a command that can be ran inside of other commands.


#4

Very interesting. I didn’t know this option and it sounds really powerful. Could you share any source related please? Rhino Developer Docs maybe?

Thanks!


#5

At the start of the class it is possible to set a “CommandStyle”. Just thought about it after I asked the question.

<System.Runtime.InteropServices.Guid("XXXXX-XXXXX-XXXXX-XXXXX"), CommandStyle(Style.Transparant)>

With the same CommandStyle you can set different things. Like if the command can be auto completed if you type it in the command bar (hidden), notrepeatable, or notundoable. This is the same location where you can tell ScriptRunner. It means if the command makes use of a script (RhinoApp.Runscript).