Prod.: Engine, ver.: 6, ID: 60000290, HowTo : Diameter symbol to be displayed as in ACAD

HowTo : Diameter symbol to be displayed as in ACAD

Article60000290
TypeHowTo
ProductEngine
Version6
Date Added10/29/2007
Submitted byRaymond Toh
Keywords

Subject

Diameter symbol to be displayed as in ACAD

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");
}