File I/O ( File IO ) with RhinoCommon, open, import, save

dear everyone.
there is a old topic about opening and importing files with rhino common.
The answer is to do it via Command-Line-Scripting:

any news / better approaches about this ?

and if i have to do the Commandline-Scirpt
how can i suppress the optional Save changes to //theCurrentFile//.3dm ?
is there a way to query “any changes since last save” ? to have a commandline-Script that includes a Yes/No for this Question ?

thanks for help. best Tom

No, scripting the Open, Import, Save, Export, etc. commands are the best approach.

The the document’s Modified parameter to false. For example:

protected override Result RunCommand(RhinoDoc doc, RunMode mode)
  doc.Modified = false; // Any changes will be lost...
  // TODO...

– Dale

1 Like