How to write script in Python for SetPt Command


#1

I’d like to write script in Python for SetPt Command.

“SetPt” command ( and some other cases ) shows specific option dialog to input, I’d like to set the options from script.

Where can I find these method ?


(Willem Derks) #2

Hi Katsu,

you could always use a the hyphened version of the command like so:

   rhinoscriptsyntax.Command('_-SetPt ...

it will suppress the dialog and prompt to the commandline instead:

Location for points ( XSet=Yes YSet=Yes ZSet=Yes Alignment=World Copy=No ):

HTH
-Willem


(Dale Fugier) #3

Here is a sample in C#:

https://github.com/dalefugier/SampleCsCommands/blob/master/SampleCsSetPoint.cs

You should be able to translate into Rhino.Python.


#4

Hi Willem

This is simple and easy way.
Thank you very much .

Katsu


#5

Hi dale,

Thank you very much.

I was moved by your code.

I found SetPt command is not a special function, but only a transform…