VS:GetNumDashDataPairs

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

Function GetNumDashDataPairs returns the number of dash/gap value pairs defined for the specified dash style. The "scale with thickness" setting is also returned. Dash styles support up to 5 dash/gap value pairs.

FUNCTION GetNumDashDataPairs(
dashIndex :INTEGER;
VAR swt :BOOLEAN) : INTEGER;
def vs.GetNumDashDataPairs(dashIndex):
    return (INTEGER, swt)

Parameters

dashIndex INTEGER The dash style index.
swt BOOLEAN The "scale with thickness" setting.

Example

PROCEDURE Example;
VAR
n, numPairs, dashIndex : INTEGER;
scaleWThick  :BOOLEAN;
arrayDashDat : ARRAY[1..5] OF POINT;
x,y : REAL;

BEGIN

dashIndex := GetDashStyleIndex(TRUE, 2, 0.12, 0.18, 0.03, 0.07);

numPairs := GetNumDashDataPairs(dashIndex,scaleWThick);

FOR n := 1 TO numPairs DO BEGIN
 IF (GetDashDataValPairAt(dashIndex, n , x, y)) THEN BEGIN
   arrayDashDat[n].x := x ;
   arrayDashDat[n].y := y ;
 END; 
END;

END;
RUN(Example);

Version

Availability: from Vectorworks 2015

See Also

VS Functions:

VS:GetDashDataValPairAt | VS:GetDashStyleIndex

VS Functions:

[[VS:GetDashDataValPairAt]]

| [[VS:GetDashStyleIndex]]