Hi. Never know who to pin to this kind of topic @pascal @dale @stevebaer ? I’d like to talk about this method as its behavior is different than description besides gives different results than usually expected.
At first glance description of it currently is wrong as it does NOT change the current document to saved document while -> https://developer.rhino3d.com/api/RhinoCommon/html/M_Rhino_RhinoDoc_WriteFile.htm says that “Note, the active document’s name will be changed to that of the path provided” i guess its time to fix the description of it.
Now to the business why this command when providing
WriteSelectedObjectsOnly=true with -> https://developer.rhino3d.com/api/RhinoCommon/html/T_Rhino_FileIO_FileWriteOptions.htm is saving tons of unnecessary data i guess @Jarek is also fighting with it is it so hard to write only selected models materials to that file do i really need 200 others when I do that in complex scene? The only way of cleaning them is to reload and purging - I will certainly do it via File3dm so I would like to know at least if i should do only materials cleaning or there is more garbage kept?
Note: Don’t tell me i should use File3dm for writing/reading if I want fancy handling as there is no way to cast for eg. InstanceDefinition to InstanceDefinitionGeometry and without it there are always some parts missing in it (just as example)
Next differences in v5 and v6 - what is the purpose of showing in command prompt information that file was saved in v6 as this is done via code and it returns bool it should be up to developer if he/she wants to RhinoApp.Write shouldn’t it ?
Due to API - Write3dmFile vs WriteFile and also vs v5 WriteFile - i understand that v6 and v5 writefile is the same (ofc extended by v6 stuff) but what introduces Write3dmFile only that it auto adds extension or it should be v5 writefile and v6 writefile description is good but behavior bad?
I struggle more than a two weeks with proper saving selected assets from the opened file and loading them. Can someone prepare short example but COMPLETE of writing InstanceDefinition with all its properties/attributes etc. (without unnecessary garbage) to a file and reading it back?
Note: I am aware of this one but it is incomplete - API lacks URLs.
Sorry for wall of text about it but working with this IO is a real pain lately - maybe i just have weird needs.