Rhinocommon RunScript SaveAs and Export problem

i try to use RunScript to export some objects to an slc-File but get an error

Code:

string strCommand = “_-Export C:\Users\fleixi\Desktop\test.slc Enter";
RhinoApp.RunScript(strCommand, true);
strCommand = "
-SaveAs C:\Users\fleixi\Desktop\test.slc _Enter”;
RhinoApp.RunScript(strCommand, true);

and get this output:

 _-Export
C:\Users\fleixi\Desktop\test.slc
Unknown command: C:\Users\fleixi\Desktop\test.slc
_Enter
_-SaveAs
C:\Users\fleixi\Desktop\test.slc
_Enter
Failed to save as C:\Users\fleixi\Desktop\test.slc.
The file writing plug-in failed.

i need export to get working and saveas is only for testing but i dont understand why export is saying unknown command for my filepath.

ps i have allready added
[Rhino.Commands.CommandStyle(Rhino.Commands.Style.ScriptRunner)]
on top of my command

nevermind i found the problem. (i have had some problems with the selection of object, none was selected)

1 Like