70002129 VDF Line Widths

Article 70002129
Type HowTo
Product Engine
Version 8
Date Added 1/6/2022 12:00:00 AM
Fixed 9.9003.0.4 (1/6/2022 12:00:00 AM)
Submitted by Soon Hui Ngu


This article will try to explain how VectorDraw deals with the several line width properties and what compatibility exists with ACAD.


VDF Line Widths

There are 2 properties that apply to vdFigure objects
1.PenWidth : a double value in Drawing Units
2.LineWeight: a constants enum value in handrend of millimiters relative to the output device (screen-bitmap-printer paper etc)
and special values : ByLayer, ByBlock, Default,

If Penwidth is > 0.0 then Penwidth is used and LineWeight is ignored.
If PenWidth is 0.0 then LineWeight is used.

If LineWeight is used and vdDocument.LineWeightDispaly is false then penwith is used.

vdDocument.LineWeightDisplay is global and used for all documents

If LineWeight is ByLayer then the object's Layer LineWeight is used.

If LineWeight is ByBlock then the object's owner LineWeight is used(For example a Line that belongs to a Block and has LineWeight= ByBlock).

If LineWeight is Default then the vdDocument.LineWeight is used. Note that vdDocument.LineWeight is global and apply to all documents.

The Final applied width will take a value that will not be smaller than vdDocument.GlobalRenderProperties.MinPenWidth (which has default value 0.006)
vdDocument.GlobalRenderProperties.MinPenWidth is a double value in output device inches.Note that if it is 0 then 1(one) pixel size is used.

PenWidth and LineWeight are not applied to vdText objects. The with of texts is controled by Bold property.

LineWeights are drawn always with pencaps rounded.
vdDocument.PenCapsSquare contrlos the pen caps of entities that have PenWidth > 0.

Polylines have an extra property Widths that defines the Start,End width for each segment.
Widths is an Array of doubles.
If vdPolyline.Widths exist and its length is number of items in VertexList *2 , quads are drawn foreach segment according to their start and end widths.

When Polyline has a LineType other than solid vdPolyline.Widths are ingnore and PenWidth or LineWeight is used.

vdPolyline.PLineDrawFlag and vdDocument.PLineDrawFlag controls if the quands will be filled or not.
Default value for vdPolyline.PLineDrawFlag is Default(means vdDocument.PLineDrawFlag is used) and default value for vdDocument.PLineDrawFlag is SolidWidths.

LineWeigths are not applied to Polyline Widths quants.

ACAD seams to use a strange way to display Polyline Widths Quants . Displays them as solid when polyline plane (see Extrution Vector) is parallel to the view plane and as wire lines when it is not.

If you want to keep compatibility View with ACAD and use Polyline with Widths property then
Polyline must be a 2d polyline(all vertexes must have the same Z value)
Extrution Vector of the polyline to 0,0,1
LineWeight to 0
LineType to Solid
vdPolyline.PLineDrawFlag = Default
vdDocument.PLineDrawFlag = Default

If your Polyline is 3d then only LineWeight is compatible with ACAD.

NOTE that in ACAD there is the LineWeight command globaly affects in the same way to All documents

Send comments on this topic.