Change the line style

Discuss and ask questions about CAD .NET library.

Moderators: SDS, support, admin

Post Reply
NetProger
Posts: 7
Joined: 06 Feb 2012, 17:10

Change the line style

Post by NetProger » 06 Feb 2012, 17:33

Hello.
How can I change the line style or line style of any object? For example, I need to replace the solid style to the intemittent style. Is this possible?
Thanks.

NetProger
Posts: 7
Joined: 06 Feb 2012, 17:10

Re: Change the line style

Post by NetProger » 07 Feb 2012, 09:48

The method .dashstyle=1 does not work.

support
Posts: 3272
Joined: 30 Mar 2005, 11:36
Contact:

Re: Change the line style

Post by support » 08 Feb 2012, 16:28

Hello.
CAD Import .NET provides CADLineType class for the line type specifying. The correspond line type object must be created if not contained in imported drawing data:

Code: Select all

    CADLineType LType = this.cadImage.Converter.LTypeByName("ISO dash");
    if (LType == null)
    {
        CADLineType LType = new CADLineType();
        LType.Name = "ISO dash";
        LType.Lines.Initialize(new double[] { 1.2, -0.9 });
        this.cadImage.Converter.Loads(LType);
        this.cadImage.Converter.GetSection(CADImport.FaceModule.ConvSection.LTypes).AddEntity(LType);
    }
    CADLine entLine = (CADLine)this.cadImage.Converter.Entities[i];
    entLine.SetLType(this.cadImage.Converter.LTypeByName("ISO dash"));
    entLine.Loaded(this.cadImage.Converter);
    //if cadImage.UseDoubleBuffering is false
    this.cadPictBox.Invalidate();
Alexander.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

NetProger
Posts: 7
Joined: 06 Feb 2012, 17:10

Re: Change the line style

Post by NetProger » 09 Feb 2012, 09:49

Thank you very much. Everything is working.

Post Reply