60000814 Update of new added LineTypes objects is missing

Article 60000814
Type Wish
Product Engine
Version 6014
Date Added 3/17/2009 12:00:00 AM
Fixed (3/17/2009 12:00:00 AM)
Submitted by Francois Peens

Summary

Update of new added LineTypes objects is missing

Solution


In 6015 an Update method was added in vdLineType object.


This method updates the object in order figures with this linetype to be drawn properly.


Must be called after change of properties


Also RegenAll command calls the Update method for each linetype in linetypes collection of vdDocument object.

 

Example in VB6 with vdraw.ocx component:

 

MCAD.ActiveDocument.TextStyles.Add "linetype_test" ''create a textstyle for linetype
   
    Set linetype1 = MCAD.ActiveDocument.LineTypes.Add("test_A")

    linetype1.Comments = "vdtestA ____ A ____ A ____"
    linetype1.NumDashes = 3
    linetype1.SetDashAt 0, 1#
    linetype1.SetDashAt 1, -0.7
    linetype1.SetDashAt 2, 0.7
    linetype1.SetShapeOffsetAt 1, -0.5, 0#
    linetype1.SetShapeStyleAt 1, "linetype_test" 'the style must be exist in textstyles
    linetype1.SetFlagAt 1, 2 'Use 2 for True type fonts and then SetTextAt to define the text
    linetype1.SetTextAt 1, "A"
    linetype1.SetShapeScaleAt 1, 1#
   
   
    linetype1.Update

Send comments on this topic.