Page 1 of 1

Line type check

Posted: 11 May 2022, 19:19
by larios
Hello, I am new to CAD file management, and my question is:
How can I determine the line type af an entity ?

I have tried with the "lineEnt(I).LineType.DashStyle" property, but it has always "Solid {0}" value even if the shape has dash dot line.

The "lineEnt(I).LineType.EntName" seems to be better because value is string "Continuous" in case of continuous line or "CENTERX2" in case of dash dotted line, is this the correct property to check ?

I think it is not a good idea to check a string content for evaluate a property like this, i do not know how many different values the property "lineEnt(I).LineType.EntName" can have.

Thank you

Re: Line type check

Posted: 12 May 2022, 17:44
by support
Hello,
LineType.EntName refers to a line type name, a style. To find other styles in an open drawing, you can use

Code: Select all

cadImage.converter.GetSection(ConvSection.LTypes).List
To create a new style, you can use
private void AddLineType()
        {
            CADLineType vLineType = new CADLineType();
            vLineType.Name = cnstLTypeName;
            vLineType.Lines.AddTick(25);
            vLineType.Lines.AddTick(-12.5);
            AddEntToSection(ConvSection.LTypes, vLineType);
        }
To find a line type by name, you can use

Code: Select all

CADLineType findLType = cadImage.converter.LTypeByName(name);
Maria