VS:SetFPat

From Vectorworks Developer
Jump to: navigation, search

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

Description

Procedure SetFPat sets the fill pattern of the referenced object.

To apply a bitmap fill pattern, use positive value corresponding to the index of the bitmap pattern. To apply a vector fill pattern, use the negative of the vector fill index (index * -1).

Fill patterns and their associated constants can be found in the VectorScript Appendix.

PROCEDURE SetFPat(
h  :HANDLE;
fillPattern  :LONGINT);
def vs.SetFPat(h, fillPattern):
    return None

Parameters

h HANDLE Handle to object.
fillPattern LONGINT Fill index value.

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 All Versions
Personal tools
NamespacesFFFF

Variants
Actions
Advanced Search
See Also
Navigation
Toolbox