Grasshopper

algorithmic modeling for Rhino

Hi all,

I'm trying to write a GH or Rhino plugin in C# to export all layers to individual files with the layer names as filenames.

After searching around I've found this page How to run a Rhino command from a plug-in command that seem to describe a solution for calling Rhino commands from code.

The example above is very simplistic and it's not clear if a file export is even possible using this method due to the fact that there is the file save dialogue to contend with.

Is there an example I can look at to describe a method that allows for this?

All help greatly appreciated

Thanks

Paul 

Views: 1543

Replies are closed for this discussion.

Replies to This Discussion

Update:

I am using a Grasshopper c# script component and need to export to .OBJ.

Looking around I find all sorts of conflicted examples some for RhinoCommon other for older versions of the API, just an awfully confusing mess.

I need a one liner like this:

Rhino.RhinoApp.RunScript("_-export " + saveLocation + " _Enter", false);

Any ideas for a current syntax?

Thanks

Paul

GH: Build 0.9

Rhino: 5.6.31

Actually the code above runs just fine, there was a typo in the saveLocation variable carried over from the copy/paste.

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service