VS:CreateCustomObjectN

From Vectorworks Developer
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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

Description

Creates a custom object instance at specified location and angle of rotation. The calling function can also set whether the pref dialog should appear.

FUNCTION CreateCustomObjectN(
objectName :STRING;
pX,pY :REAL;
rotationAngle :REAL;
showPref :BOOLEAN) : HANDLE;
def vs.CreateCustomObjectN(objectName, p, rotationAngle, showPref):
    return HANDLE

Parameters

objectName STRING Name of object.
p REAL Insertion point of object instance.
rotationAngle REAL Rotation angle (in degrees) of object instance.
showPref BOOLEAN Show the Object Properties dialog.

Example

VectorScript

PROCEDURE Example;
VAR
h :HANDLE;
BEGIN
h := CreateCustomObjectN('Door', 0, 0, 0, False);
END;
RUN(Example);

Python

def Example():
	h = vs.CreateCustomObjectN('Door', 0, 0, 0, False)
Example()

Version

Availability: from VectorWorks10.0