Hi ,
How can I use DashStyle property for dashed or dot-dashed line drawing ?
How can I use DashStyle property ?
Moderators: SDS, support, admin
Re: How can I use DashStyle property ?
Hello,
To draw a dashed or dot-dashed line, one should create a line type (CADLineType), specify its pattern (length of dash - positive value, length of space - negative value, length of dot - 0) by code and apply it to the created line:
Mikhail
To draw a dashed or dot-dashed line, one should create a line type (CADLineType), specify its pattern (length of dash - positive value, length of space - negative value, length of dot - 0) by code and apply it to the created line:
Code: Select all
CADLineType DashLType = new CADLineType();
DashLType.Lines.Initialize(new double[] { 1.2, -0.5, 0.0, -0.5, 1.2 });
DashLType.Name = "Dash dot";
cadImage.Converter.Loads(DashLType);
cadImage.Converter.GetSection(CADImport.FaceModule.ConvSection.LTypes).AddEntity(DashLType);
CADLine cadLine = new CADLine
{
LineType = cadImage.Converter.LTypeByName("Dash dot"),
Point = new DPoint(0, 0, 0),
Point1 = new DPoint(500, 800, 0),
Color = Color.Blue,
};
cadImage.Converter.Loads(cadLine);
cadImage.Layouts[0].AddEntity(cadLine);
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support