60000290 Diameter symbol to be displayed as in ACAD

Article 60000290
Type HowTo
Product Engine
Date Added 10/29/2007 12:00:00 AM
Fixed (10/29/2007 12:00:00 AM)
Submitted by Raymond Toh

Summary

Diameter symbol to be displayed as in ACAD

Solution

*** This article applies to 6010 version and above ***

New properties of vdDimStyle was added in 6010
DiameterSymbol for diameter type dimensions
and RadialSymbol to be used as prefix for radial type dimensions
By default "D" is used for diameter and "R" for radial


You can have your application to use specific Diameter and radial string values by implementing the following 2 events :

public Form1()
{
    InitializeComponent();
    vdFramedControl1.BaseControl.AfterNewDocument +=
new VectorDraw.Professional.Control.AfterNewDocumentEventHandler(BaseControl_AfterNewDocument);
    vdFramedControl1.BaseControl.AfterOpenDocument +=
new VectorDraw.Professional.Control.AfterOpenDocumentEventHandler(BaseControl_AfterOpenDocument);
}

void ChangeDimensionsStylePrefix(string PrefixDiameter,string PrefixRadial)
{
     foreach (vdDimstyle style in vdFramedControl1.BaseControl.ActiveDocument.DimStyles)
     {
          style.DiameterSymbol = PrefixDiameter;
          style.RadialSymbol = PrefixRadial;
     }
}
void BaseControl_AfterOpenDocument(object sender)
{
    ChangeDimensionsStylePrefix(
"%%c","r");
}
void BaseControl_AfterNewDocument(object sender)
{
    ChangeDimensionsStylePrefix(
"%%c","r");
}

Send comments on this topic.