Procedure PrimaryUnits specifies the primary units settings for the active document. The primary units setting is used by the document for all measurement entry and display values in the document.
{| class="wikitable" style="float: right;" |+ Table - Units Formats ! Units Format
| ! Constant |
|---|
| Decimal |
| style="text-align:center" |
| - |
| Fractional |
| style="text-align:center" |
| - |
| Decimal Ft/Inches |
| style="text-align:center" |
| - |
| Fractional Ft/Inches |
| style="text-align:center" |
| } |
| { |
| + Table - Standard Unit Settings |
| ! Units Setting !! Constant |
| - |
| Custom |
| style="text-align:center" |
| - |
| Feet/Inches |
| style="text-align:center" |
| - |
| Inches |
| style="text-align:center" |
| - |
| Feet |
| style="text-align:center" |
| - |
| Yards |
| style="text-align:center" |
| - |
| Miles |
| style="text-align:center" |
| - |
| Microns |
| style="text-align:center" |
| - |
| Millimeters |
| style="text-align:center" |
| - |
| Centimeters |
| style="text-align:center" |
| - |
| Meters |
| style="text-align:center" |
| - |
| Kilometers |
| style="text-align:center" |
| } |
PROCEDURE PrimaryUnits(
style : INTEGER;
prec : LONGINT;
dimPrec : LONGINT;
format : INTEGER;
angPrec : INTEGER;
showMark : BOOLEAN;
dispFrac : BOOLEAN);def vs.PrimaryUnits(style, prec, dimPrec, format, angPrec, showMark, dispFrac):
return None| Name | Type | Description |
|---|---|---|
| style | INTEGER | Active primary unit style for document. |
| prec | LONGINT | Display precision. |
| dimPrec | LONGINT | Dimension precision. |
| format | INTEGER | Decimal formatting. |
| angPrec | INTEGER | Angular precision. |
| showMark | BOOLEAN | Unit mark display setting. |
| dispFrac | BOOLEAN | Fractional display setting. |
[sd 8/18/98] See [[VS:GetPrimaryUnitInfo| GetPrimaryUnitInfo]] for details on changes in VW9 and again in VW12.
==== VectorScript ====
PROCEDURE Example;
VAR
style :INTEGER;
prec, dimPrec :LONGINT;
format, angPrec :INTEGER;
showMark, dispFrac :BOOLEAN;
outStr :STRING;
BEGIN
outStr := '';
GetPrimaryUnitInfo(style, prec, dimPrec, format, angPrec, showMark, dispFrac);
FOR style := 0 to 16 DO BEGIN
PrimaryUnits(style, prec, dimPrec, format, angPrec, showMark, dispFrac);
outStr := Concat(outStr, Chr(13), style, ': ', GetPrefReal(152));
END;
AlrtDialog(outStr);
END;
RUN(Example);==== Python ====
Availability: from MiniCAD 7.0
- Units