VCAddLineType


Version:

1.2

Description:

Adds a new line type at the next undefined line type index. .

Declaration:

 

C/C++

extern "C" short WINAPI VCAddLineType(short* iError, char* pName, short bCode, short iDashCount, double* pDashes);

Delphi

function VCAddLineType(var iError: Smallint; pName: PAnsiChar; bCode: Smallint; iDashCount: Smallint; var pDashes: Double):Smallint; stdcall;

ActiveX/COM

Function AddLineType(ByVal pName As String, ByVal bCode As Integer, ByVal Double_Array As Variant) As Integer

Parameters:

pName - the name to be assigned to the new line type.
bCode
- determines whether the new line type has world or device scale and is balanced or unbalanced.
0 - world scale, unbalanced.
1 - world scale, balanced.
2 - device scale, unbalanced.
3 - device scale, balanced.
iDashCount - the number of dashes used and the size of the pDashes array.
pDashes
- points to an array of double values representing each dash length in the new line typw.

Return Value:

The line type index assigned to the new line type.

Notes:

Visual CADD™ line types use either a world scale or a device scale. Device line types will always appear with the defined lengths regardless of the drawing view on screen or the print size. World scale line types will always be displayed and printed to scale, that is a 1" dash printed at ¼ scale will be ¼" long on paper.

Visual CADD™ line types use either balanced or unbalanced. Balanced line types start and end the line with a dash and have the dash-space pattern centered between the endpoints. Unbalanced line types start at the first segment and proceed with defined spaces and dashes, which can result in a line starting and ending with space at one and dash at the other.

The pDashes array must contain dash lengths for the line type in order they are to be drawn in the line. A positive value indicates a displayed (or on) dash length while a negative value indicates a non-displayed (or off) dash length. These non-displayed dash lengths can be thought of as an offset length from the end of the last dash length to the beginning of the next dash length.

See Also:

VCAddLine3D, VCAddLineEntity