Product : Converter, Version : 4.1.6.1029, ArticleID : 41023397

HowTo : Penstyle property not saved the same in vdf and dwg format.

Article41023397
TypeHowTo
ProductConverter
Version4.1.6.1029
Date Added1/19/2004
Submitted byMalcolm Post
Keywords

Subject

Penstyle property not saved the same in vdf and dwg format.

Summary

After changing the PenStyle property of a shape to vdPenDashed (code sample below), everything looks okay.
If I save the document in any of the VDF or VDI formats and reopen the document, the PenStyle is correct (vdPenDashed).
However, if I then save the document to any of the dwg formats and reopen the document, the stlye has changed to vdLineTypeDASHED.
Here is the code I use

    On Error Resume Next 
    Dim pPoint As Variant 
 
    pPoint = VDraw.Utility.GetPoint 
    Set pFigure = VDraw.ActiveDocument.GetEntityFromPOINT(pPoint) 
    pFigure.Invalidate 
    pFigure.PenStyle = VdPenDash 
    pFigure.Update 
    pFigure.Invalidate 

Solution

The VdPenSolid, VdPenDash, VdPenDot, VdPenDashDot, VdPenDashDotDot are the API styles and they are not compatible with DWG/DXF format. When the drawing is saved in DWG/DXF then these are converted to :
    VdPenDash to VdLineTypeDASHED
    VdPenDot to VdLineTypeDOT
    VdPenDashDot to VdLineTypeDASHDOT
    and VdPenDashDotDot to VdLineTypeDASHDOT2