Read stl file directly

  1. In plugin, i create a form with a button to load stl file.
  2. i keyin the path of stl into code.

my question is that is it possible to load the stl file directly by click the button?

Hi Frank,

To open or import an STL file, just script the Open or Import command using RhinoApp.RunScript.

Here are a couple of examples:

https://github.com/dalefugier/SampleCsCommands/blob/master/SampleCsOpen3dm.cs
https://github.com/dalefugier/SampleCsCommands/blob/master/SampleCsOpenDwg.cs

Does this help?

– Dale

Sir :
I have a question about how to get Dara in plugin project .
For example I import two mesh , and I want to smoth 2nd object .
How can I get the mesh with program not picked by mouse.

從我的 Samsung Galaxy 智慧型手機傳送。
-------- 原始訊息 --------自: Dale Fugier mcneel@discoursemail.com 日期: 2017/1/12 05:00 (GMT+08:00) 至: ccupcpop@gmail.com 主旨: [McNeel Forum] [Rhino Developer] Read stl file directly

          dale
            McNeel
          

          January 11

Hi Frank,

To open or import an STL file, just script the Open or Import command using RhinoApp.RunScript.

Here are a couple of examples:

https://github.com/dalefugier/SampleCsCommands/blob/master/SampleCsOpen3dm.cs
https://github.com/dalefugier/SampleCsCommands/blob/master/SampleCsOpenDwg.cs

Does this help?

– Dale

Visit Topic or reply to this email to respond.

To unsubscribe from these emails, click here.

Hi Frank,

If you script a command, such as Open or Import, and you want to get the objects that were created but you do not want to pick them, then you can use a technique demonstrated by this example:

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

Does this help?

– Dale