VS:AddVectorFillLayer

From Vectorworks Developer
Jump to: navigation, search

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

Description

Procedure AddVectorFillLayer is used to add layers to a vector fill definition. This procedure call should follow a call to BeginVectorFillN.

The input parameters for a vector fill layer match the inputs from the right side of the VectorWorks hatch editor dialog.

A color table listing with associated index values can be found in the Appendix.

PROCEDURE AddVectorFillLayer(
xStart  :REAL;
yStart  :REAL;
xRepeat  :REAL;
yRepeat  :REAL;
xOffset  :REAL;
yOffset  :REAL;
dashFactor  :REAL;
lineWeight  :INTEGER;
colorIndex  :INTEGER);
def vs.AddVectorFillLayer(xStart, yStart, xRepeat, yRepeat, xOffset, yOffset, dashFactor, lineWeight, colorIndex):
    return None

Parameters

xStart REAL X coordinate of fill origin.
yStart REAL Y coordinate of fill origin.
xRepeat REAL X coordinate of fill repeat origin.
yRepeat REAL Y coordinate of fill repeat origin.
xOffset REAL X coordinate of fill offset origin.
yOffset REAL Y coordinate of fill offset origin.
dashFactor REAL Dash factor of layer(percentage of fill line that is solid).
lineWeight INTEGER Line weight of layer, in mils.
colorIndex INTEGER Pen color of layer.

Remarks

Follows a call to BeginVectorFill. The input for the layer match the input from the right side of the hatch editor dialog.

Example

VectorScript

{ Create a new hatch and add it to the resource list. }
hatchName := 'Hatch-1';
BeginVectorFillN(hatchName, TRUE, FALSE, 0);
AddVectorFillLayer(0, 0, 1, 1, .25, -.25, .7, 3, 255);
EndVectorFill;
newHatch := GetObject(hatchName);
index := AddResourceToList(listID, newHatch);

Python

def Example():
	#{ Create a new hatch and add it to the resource list. }
	kHatch = 66
	kDefHatchFolder = 105
	hatchName = 'Hatch-1'

	listID, numItems = vs.BuildResourceList(kHatch, kDefHatchFolder, '')
	vs.BeginVectorFillN(hatchName, True, False, 0)
	vs.AddVectorFillLayer(0, 0, 1, 1, .25, -.25, .7, 3, 255)
	vs.EndVectorFill()
	newHatch = vs.GetObject(hatchName)
	index = vs.AddResourceToList(listID, newHatch)
Example()

Version

Availability: from MiniCAD7.0.1
Personal tools
NamespacesFFFF

Variants
Actions
Advanced Search
See Also
Navigation
Toolbox