# How to write script in Python for SetPt Command

**URL:** <https://discourse.mcneel.com/t/how-to-write-script-in-python-for-setpt-command/10781>\
**Category:** Rhino Developer\
**Created:** [August 8, 2014, 5:28am UTC](https://discourse.mcneel.com/t/how-to-write-script-in-python-for-setpt-command/10781 "2014-08-08T05:28:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Katsu](https://avatars.discourse-cdn.com/v4/letter/k/a5b964/32.png) [@Katsu](https://discourse.mcneel.com/u/Katsu)\
**Post date:** [August 8, 2014, 5:28am UTC](https://discourse.mcneel.com/t/how-to-write-script-in-python-for-setpt-command/10781/1 "2014-08-08T05:28:18Z")

</div>

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 ?

---

<div class="post-metadata">

**Author:** ![Willem](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/willem/32/773637_2.png) [@Willem](https://discourse.mcneel.com/u/Willem)\
**Post date:** [August 8, 2014, 7:29am UTC](https://discourse.mcneel.com/t/how-to-write-script-in-python-for-setpt-command/10781/2 "2014-08-08T07:29:19Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dale](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/dale/32/772741_2.png) [@dale](https://discourse.mcneel.com/u/dale)\
**Post date:** [August 8, 2014, 3:10pm UTC](https://discourse.mcneel.com/t/how-to-write-script-in-python-for-setpt-command/10781/3 "2014-08-08T15:10:25Z")

</div>

Here is a sample in C#:

[https://github.com/dalefugier/SampleCsCommands/blob/master/SampleCsSetPoint.cs](https://github.com/dalefugier/SampleCsCommands/blob/master/SampleCsSetPoint.cs)

You should be able to translate into Rhino.Python.

---

<div class="post-metadata">

**Author:** ![Katsu](https://avatars.discourse-cdn.com/v4/letter/k/a5b964/32.png) [@Katsu](https://discourse.mcneel.com/u/Katsu)\
**Post date:** [August 9, 2014, 7:55am UTC](https://discourse.mcneel.com/t/how-to-write-script-in-python-for-setpt-command/10781/4 "2014-08-09T07:55:14Z")

</div>

Hi Willem

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

Katsu

---

<div class="post-metadata">

**Author:** ![Katsu](https://avatars.discourse-cdn.com/v4/letter/k/a5b964/32.png) [@Katsu](https://discourse.mcneel.com/u/Katsu)\
**Post date:** [August 9, 2014, 8:02am UTC](https://discourse.mcneel.com/t/how-to-write-script-in-python-for-setpt-command/10781/5 "2014-08-09T08:02:14Z")

</div>

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…
