VS:AddHole

From Vectorworks Developer
Revision as of 10:25, 12 August 2013 by Root (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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


Description

AddHole uses a holeTemplate to create a hole inside objectToGetHole. Upon success, objectToGetHole is converted to polyline. holeTemplate is unchanged.
FUNCTION AddHole(
VAR objectToGetHole  :HANDLE;
holeTemplate  :HANDLE) : BOOLEAN;
def vs.AddHole(objectToGetHole, holeTemplate):
    return (BOOLEAN, objectToGetHole)

Parameters

objectToGetHole HANDLE A 2D object to be cut by holeTemplate.
holeTemplate HANDLE A 2D object to cut a hole out of objectToGetHole.

Example

VectorScript

PROCEDURE AddHoleExample;
VAR
h1, h2 :HANDLE;
BEGIN
CallTool(-204);
h1 := FSActLayer;
CallTool(-204);
h2 := FSActLayer;
IF AddHole(h1, h2) THEN SetFPat(h1, 3);
END;
RUN(AddHoleExample);

Python

def AddHoleExample():
	vs.CallTool(-204)
	h1 = vs.FSActLayer()
	if(h1 != none):
		vs.CallTool(-204)
		h2 = vs.FSActLayer()
		if vs.AddHole(h1, h2):
			vs.SetFPat(h1, 3)
AddHoleExample()

Version

Availability: from VectorWorks10.1
Personal tools
NamespacesFFFF

Variants
Actions
Advanced Search
See Also
Navigation
Toolbox