VS:SetUnits: Difference between revisions

From Vectorworks Developer
Jump to navigation Jump to search
m (1 revision)
 
m (1 revision)
 
(No difference)

Latest revision as of 14:38, 12 August 2013

.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix

Description

Procedure SetUnits sets low-level unit values in a VectorWorks document.

If only one of the units values is to be modified, GetUnits should be called first, and the values retrieved from that call should be passed back into SetUnits.

To specify a standard units setting with default values, use Units. To specify a standard units setting, but with some modified values, use PrimaryUnit.

VectorWorks Unit Formats

Units Format Format Flag
Decimal 0
Fractional 1
Decimal Feet and Inches 2
Fractional Feet and Inches 3
PROCEDURE SetUnits(
fraction :LONGINT;
display :LONGINT;
format :INTEGER;
upi :REAL;
name :STRING;
squareName :STRING);
def vs.SetUnits(fraction, display, format, upi, name, squareName):
    return None

Parameters

fraction LONGINT Stored accuracy for the document.
display LONGINT Minimum display accuracy for the document.
format INTEGER Unit format style.
upi REAL Units per inch.
name STRING Unit label for displayed values
squareName STRING Squared unit label for displayed values.

Remarks

Sets low-level unit values. If only one of the values is desired to change, GetUnits should be called first, and the values retrieved from that call should be passed back into SetUnits. If a standard unit with default values is desired, the Units procedure should be used, not this one. If a standard unit with some modified values is desired, the PrimaryUnit procedure should be called, not this one.

[sd 8/18/98]

Example

VectorScript

SetUnits(4096,64,3,1.0,'"','sq ft');

Python


Version

Availability: from All Versions