Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

developer:sdksamples:unitsystem [2015/09/14]
127.0.0.1 external edit
developer:sdksamples:unitsystem [2016/02/02] (current)
sandy
Line 1: Line 1:
-====== ​How To: Retrieve the Unit System of the Active Document ======+======Retrieve the Unit System of the Active Document ====== 
 > **Developer:​** //​[[developer:​cplusplusplugins|C++]]//​ > **Developer:​** //​[[developer:​cplusplusplugins|C++]]//​
 > **Summary:​** //​Demonstrates how to determine the current unit system of the current document.// > **Summary:​** //​Demonstrates how to determine the current unit system of the current document.//
  
-The unit system of the active document is stored ​on an ON_3dmUnitsAndTolerances class that is located on the CRhinoDoc object.+The unit system of the active document is stored ​in an ON_3dmUnitsAndTolerances class that is located on the CRhinoDoc object.
  
-If you inside of a CRhinoCommand-derived object'​s RunCommand() member, you can get the current units system as follows:+If you are inside of a CRhinoCommand-derived object'​s RunCommand() member, you can get the current units system as follows:
  
 <code c++> <code c++>
Line 19: Line 20:
 </​code>​ </​code>​
  
-If you outside of a CRhinoCommand-derived object'​s RunCommand() member, you can get the current units system as follows:+If you are outside of a CRhinoCommand-derived object'​s RunCommand() member, you can get the current units system as follows:
  
 <code c++> <code c++>
Line 31: Line 32:
 ---- ----
  
-=====Rhino 4 Changes===== +=====Rhino 4 changes===== 
-With the addition of layouts in Rhino 4, there are now two unit systems associated with a document, model and page units. A new class has been added to [[developer:​opennurbs:​home|opennurbs]] call ON_UnitSystem which makes it easier to work with custom units. The Rhino document class now contains two functions+With the addition of layouts in Rhino 4, two unit systems ​are now associated with a document, modeland page units. A new class has been added to [[developer:​opennurbs:​home|openNURBS]] call ON_UnitSystem which makes it easier to work with custom units. The Rhino document class now contains two functions:
  
   * const ON_UnitSystem&​ ModelUnits() const;   * const ON_UnitSystem&​ ModelUnits() const;
developer/sdksamples/unitsystem.txt · Last modified: 2016/02/02 by sandy