VS:AddSymToWallEdge

From Vectorworks Developer
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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

Description

Procedure AddSymToWallEdge inserts a symbol in the referenced wall using the specified parameters to define placement.

Table - Symbol Insertion Alignment
Alignment Constant
Centerline 0
Left Edge 1
Right Edge 2
Core Component Center 3
Core Component Left Edge 4
Core Component Right Edge 5
PROCEDURE AddSymToWallEdge(
h :HANDLE;
alongDistance :REAL;
heightDistance :REAL;
flip :BOOLEAN;
right :BOOLEAN;
symbolName :STRING;
insertMode :INTEGER);
def vs.AddSymToWallEdge(h, alongDistance, heightDistance, flip, right, symbolName, insertMode):
    return None

Parameters

h HANDLE Handle to wall.
alongDistance REAL Offset distance from wall start of insertion point.
heightDistance REAL Elevation of symbol.
flip BOOLEAN Flip orientation of symbol.
right BOOLEAN Left-right orientation of symbol.
symbolName STRING Name of symbol to be inserted.
insertMode INTEGER Edge insertion mode.

Example

VectorScript

PROCEDURE Example;
VAR
x1, y1, x2, y2 :REAL;
resourceID :LONGINT;
h : HANDLE;
BEGIN
SetWallWidth(3.5");
GetPt(x1, y1);
GetPtL(x1, y1, x2, y2);
MoveTo(x1, y1);
WallTo(x2, y2);
h := LActLayer;
AddSymToWall(h,3',0',FALSE,FALSE,'Door-1');
AddWallBottomPeak(h,24'0",2'6");
END;
RUN(Example);

Python

def MyWallto(pt):
	vs.WallTo(pt[0], pt[1])
def MyMoveto(pt):
	vs.MoveTo(pt[0], pt[1])
def Example():
	vs.SetWallWidth(3.5)
	vs.GetPt( MyMoveto )
	vs.GetPt( MyWallto )	
	h = vs.LActLayer()
	vs.AddSymToWall(h,3,0,False,False,'Door-1')
	vs.AddWallBottomPeak(h,24*12+0,2*12+6);
Example()

Version

Availability: from VectorWorks 8.0