This project has moved. For the latest updates, please go here.
1

Resolved

Problem with MLINESTYLE with no elements

description

Hi,

I've run into problems loading a couple of files recently due to MLINESTYLE's with no elements. I don't know if this is valid dxf, but it seems to load fine in CAD, but causes an exception in netDxf. Unfortunately I can't add the full file as it's confidential but the dxf for the style is below:

0
MLINESTYLE
5
1E59
102
{ACAD_REACTORS
330
1E58
102
}
330
1E58
100
AcDbMlineStyle
2
STANDARD
70
0
3

62
256
51
90.0
52
90.0
71
0

As I understand it the 71 - 0 indicates that there are no elements, but netDxf doesn't allow this. I don't understand Multiline styles well enough to know if a style with no elements makes sense.

By the way, these files seem to load in version 1.1.1 which I was using previously.

comments

haplokuon wrote Apr 28 at 6:55 PM

Having a multiline style with no elements have no sense, they define how a multiline is drawn, but a style with no elements is like drawing a blank line. AutoCad allows to import such style, but creating one like that through its UI is not allowed. I will add a default element if no one is found to avoid that issue.

I don't know why it was working for you in 1.1.1 but it shouldn't. It has not been changed that much since then, and I cannot support older versions.

Daniel