# C# open new document

**URL:** <https://discourse.mcneel.com/t/c-open-new-document/32129>\
**Category:** Rhino Developer\
**Created:** [May 4, 2016, 5:02pm UTC](https://discourse.mcneel.com/t/c-open-new-document/32129 "2016-05-04T17:02:26Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![cristina.b](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/cristina.b/32/61808_2.png) [@cristina.b](https://discourse.mcneel.com/u/cristina.b)\
**Post date:** [May 4, 2016, 5:02pm UTC](https://discourse.mcneel.com/t/c-open-new-document/32129/1 "2016-05-04T17:02:27Z")

</div>

Hi,  
Scripting the “New” command in C# like this: Rhino.RhinoApp.RunScript("-\_New \_Enter", true); doesn’t seem to give any result. Am I missing something?  
Is there a better way to start a new Rhino project in C# ?  
Thank you!

---

<div class="post-metadata">

**Author:** ![dale](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/dale/32/685184_2.png) [@dale](https://discourse.mcneel.com/u/dale)\
**Post date:** [May 4, 2016, 7:29pm UTC](https://discourse.mcneel.com/t/c-open-new-document/32129/2 "2016-05-04T19:29:23Z")

</div>

Make sure to add the “script runner” command style attribute. Here is an example.

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

---

<div class="post-metadata">

**Author:** ![dale](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/dale/32/685184_2.png) [@dale](https://discourse.mcneel.com/u/dale)\
**Post date:** [May 4, 2016, 7:32pm UTC](https://discourse.mcneel.com/t/c-open-new-document/32129/3 "2016-05-04T19:32:33Z")

</div>

> **[Run a Rhino command from a Plugin](http://developer.rhino3d.com/guides/rhinocommon/run-rhino-command-from-plugin/)**
>
> This guide covers the proper techniques when running a Rhino command from within the context of a plugin command.

---

<div class="post-metadata">

**Author:** ![cristina.b](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/cristina.b/32/61808_2.png) [@cristina.b](https://discourse.mcneel.com/u/cristina.b)\
**Post date:** [May 4, 2016, 8:00pm UTC](https://discourse.mcneel.com/t/c-open-new-document/32129/4 "2016-05-04T20:00:41Z")

</div>

Thank you Dale! We will implement that.  
Any API available that would return the same results?  
Thanks!  
Cristina

---

<div class="post-metadata">

**Author:** ![dale](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/dale/32/685184_2.png) [@dale](https://discourse.mcneel.com/u/dale)\
**Post date:** [May 9, 2016, 3:59pm UTC](https://discourse.mcneel.com/t/c-open-new-document/32129/5 "2016-05-09T15:59:22Z")

</div>

> [@cristina.b](#):
>
> Any API available that would return the same results?

Sorry no.

---

<div class="post-metadata">

**Author:** ![Mbudak](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/mbudak/32/380600_2.png) [@Mbudak](https://discourse.mcneel.com/u/Mbudak)\
**Post date:** [November 7, 2019, 5:44am UTC](https://discourse.mcneel.com/t/c-open-new-document/32129/6 "2019-11-07T05:44:20Z")

</div>

Rhino.RhinoApp.RunScript("\_-New None", false);

I think the command is useful. I tried successful
