VS:AddSurface

From Vectorworks Developer
Jump to: navigation, search

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


Description

Creates a new surface object by combining the two referenced surface objects. If the combination is successful (if the objects overlap), it deletes the original surface objects and returns the handle of the resultant object.
FUNCTION AddSurface(
s1  :HANDLE;
s2  :HANDLE) : HANDLE;
def vs.AddSurface(s1, s2):
    return HANDLE

Parameters

s1 HANDLE Handle to object.
s2 HANDLE Handle to object.

Return Value

Returns a HANDLE to a new surface object.

Example

VectorScript

PROCEDURE AddSurfaceExample;
VAR
h1, h2, h3 :HANDLE;
BEGIN
DSelectAll;
CallTool(-203);
h1 := FSActLayer;
DSelectAll;
CallTool(-203);
h2 := FSActLayer;
h3 := AddSurface(h1, h2);
IF h3 <> NIL THEN SetFPat(h3, 5);
END;
RUN(AddSurfaceExample);

Python

def Example():
	vs.DSelectAll()
	vs.CallTool(-203)
	h1 = vs.FSActLayer()
	vs.DSelectAll()
	vs.CallTool(-203)
	h2 = vs.FSActLayer()
	h3 = vs.AddSurface(h1, h2)
	if h3 != None :  
		vs.SetFPat(h3, 5)
Example()

Version

Availability: from VectorWorks8.5

See Also

VS Functions:

VS:ClipSurface

VS Functions: [[VS:ClipSurface]]
Personal tools
NamespacesFFFF

Variants
Actions
Advanced Search
See Also
Navigation
Toolbox