WISH: rs.import(), rs.export(), rs.insert() methods

Hi @dale,

Regarding this topic:

Sorry to reviving this topic, but it seems to still be an actual problem.

I would like to bring several issues regarding command scripting with rs.Command()

  1. There is no way to disable redraw when using command scripting, this dramatically slows down the solution.

  2. Especially regarding import STEP. There should be a way to manipulate how the surfaces are joined. Currently the only option is surfaces above a certain number of faces to not be joined. Well it actually makes sense surfaces which do not compose a closed solid to be skipped. Alternatively if possible an additional criteria like: surfaces below a certain number of faces to be skipped as well. Say you have a box you want it to be joined only if there are exactly 6 faces with the same properties (name color or some other attribute)

  3. Again regarding STEP. There could be done inside this method an option to convert block-structure into layer-structure. I use two scripts for this operation. When you disable redraw it is as fast as 0.05 secs for really big models with 100+ nested blocks.


All of these commands can be scripted using rs.Command.

– Dale

not good enough Dale, this is what I’m saying. more access is needed.

If I knew how to do it I wouldn’t have requested it. It seems a good challenge but I don’t even know where to begin :slight_smile:

Another issue when using rs.Command() is described here:

Well, unfortunately, this is the suggested method.

File formats are implemented by plug-ins, written us and others. Each of these formats provides a different import or export option. Because of these differences, there is no easy way of writing a single, universality “Export” or “Import” function that works with all these formats and their options. Thus, scripting these command is the way to go.

– Dale

Thanks for the reply @dale

Would it be too much to ask for an open-source example of an import-export plugin of some file? I guess even import/export of txt point coordintates would suffice.

Direct SDK access to import/export of different file types is a big project and is something that we are experimenting with in V7. Experimenting in this case means we don’t have a whole lot to show yet.

Thanks @stevebaer,

So for now Cpp is the only way.

This is one of the things I am after:


Specifically for C++:


I don’t have an .NET samples. But basically just run the RhinoCommon plug-in wizard in Visual Studio and select either the “Import” or “Export” plug-in style.

– Dale

1 Like

Yeah, I think I’m gonna wait for the .net implementation.

Opening the project in VS2017 leads to so many errors and I haven’t seen Cpp code since I was 15. There’s no way I’m making this work.