Skip to content

Latest commit

 

History

History
55 lines (45 loc) · 1.16 KB

GetOriginInDocUnits.md

File metadata and controls

55 lines (45 loc) · 1.16 KB

GetOriginInDocUnits

Description

Procedure GetOriginInDocUnits returns the current origin location relative to the center of the page in current units. It fixes the problem existing for GetOrigin (see remarks). The behavior is the same while used during objects reset and in commands.

PROCEDURE GetOriginInDocUnits(
				VAR x : REAL;
				VAR y : REAL);
def vs.GetOriginInDocUnits():
    return (x, y)

Parameters

Name Type Description
x REAL Returns X coordinate of origin.
y REAL Returns Y coordinate of origin.

Examples

PROCEDURE Example;
VAR
originPt : VECTOR;
BEGIN
GetOriginInDocUnits(originPt.x, originPt.y);
Message(originPt);
END;
RUN(Example);
GetOriginInDocUnits(1.0, 2.0);
import vs

# Procedure GetOriginInDocUnits returns the current origin location relative
# to the center of the page in current units.
x, y = vs.GetOriginInDocUnits()
vs.Message('GetOriginInDocUnits returned: ' + str((x, y)))

See Also

VS Functions: GetOrigin

Version

Availability: from Vectorworks 2016

Category