Skip to content

Latest commit

 

History

History
44 lines (34 loc) · 1 KB

XCenterN.md

File metadata and controls

44 lines (34 loc) · 1 KB

XCenterN

Description

Returns the x-coordinate of the center point of the bounding box of an object matching the search criteria. If more than one object matches the search criteria, the function will return the x-coordinate of the average center point of all the matching objects

FUNCTION XCenterN(c : CRITERIA): REAL;
def vs.XCenterN(c):
    return REAL

Parameters

Name Type Description
c CRITERIA Search criteria.

Examples

XCenValue:=XCenterN(N='Board');
{returns the x-coord of the center of the bounding box the named object 'Board'
resultVal := XCenterN(c);
import vs

# Returns the x-coordinate of the center point of the bounding box of an
# object matching the search criteria.
c = "(SEL=TRUE)"  # selection criteria - all selected objects

value = vs.XCenterN(c)
vs.Message('XCenterN returned: ' + str(value))

Version

Availability: from Vectorworks 2012

Category