Rename active document

Hello Forum,

I’m developing under RhinoCommon for Rhino 5 and releasing to both Rhino 5 and 6.

When I perform a saveAs using RhinoDoc.WriteFile Method or RhinoApp.RunScript(" -_SaveAs …")

the two versions behave differently. Both save the doc with the new name, but at the end Rhino 5 changes the document name while Rhino 6 doesn’t. I’ve seen that RhinoCommon for Rhino 6 has a specific method for that, but I can’t use it.

Is there a way to rename my document or, in general, a workaround for this problem?

Thanks. L

You could use reflection to get around this issue.


thanks. Can you please be more specific? Do you mean that I can use RhinoCommon for Rhino 5 and RhinoCommon for Rhino 6 in the same time with reflection?

Thanks. L

1 Like

Sorry, I meant that you could reference the Rhino 5 RhinoCommon but use reflection when running under V6 to look up and call the function that makes things work. What is the function that you would use if you were running just under V6?