Click or drag to resize

RhinoDocReadFileVersion Method

Returns the major version of Rhino that wrote the .3dm file this document was read from. Values from referenced or merged files are not reported.

Namespace:  Rhino
Assembly:  RhinoCommon (in RhinoCommon.dll)
Since: 5.0
Syntax
public int ReadFileVersion()

Return Value

Type: Int32
The Rhino major version (e.g. 1, 2, 3, ... 8, 9), or -1 if this document was not read from a .3dm file.
Remarks
This is the Rhino version, not the 3dm archive version: a file written by Rhino 8 returns 8, not 80. Use ReadArchiveVersion(String) for the archive version of a file on disk, or ReadRevisionHistory(String, String, String, Int32, DateTime, DateTime) for who last edited it. A document created by "New" returns -1 even when a template was read.
See Also