VS:CreateStaticHatch: Difference between revisions

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

Latest revision as of 14:25, 12 August 2013

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

Description

Creates a static hatch using inHatchName inside the bounded selection surrounding the point. rotationAngle determines the rotation of the result.

FUNCTION CreateStaticHatch(
inHatchName :STRING;
pX,pY :REAL;
rotationAngle :REAL) : HANDLE;
def vs.CreateStaticHatch(inHatchName, p, rotationAngle):
    return HANDLE

Parameters

inHatchName STRING The name of the hatch definition to use for the hatch.
p REAL A point inside the bounds defined by the current selection
rotationAngle REAL An angle that specifies an offset angle. Zero degress is due East.

Return Value

A group of lines in the pattern as specified.

Remarks

The hatch is created in an arbitrary angle, not as defined.

Example

VectorScript

PROCEDURE Example;
VAR
h:HANDLE;
x,y:REAL;
BEGIN
GetPt(x,y);
h := CreateStaticHatch('Default Hatch', x, y, 0);
DSelectAll;
SetSelect(h);
END;
RUN(Example);

Python

def PickPointCallback(pt):
	h = vs.CreateStaticHatch('Default Hatch', pt[0], pt[1], 0)
	vs.DSelectAll()
	vs.SetSelect(h)

vs.GetPt( PickPointCallback )

Version

Availability: from VectorWorks10.1