Skip to content

Failed to read dxf file #651

Open
Open
@pswhall

Description

@pswhall

When reading a dxf file, the message "The layer color cannot be ByLayer or ByBlock" is displayed.

  1. I see a layer color setting code that checks as shown below. Is it absolutely necessary?
  2. Is there a problematic value among the color values ​​of the layer in my dxf file?

ACadSharp/Tables/Layer.cs

/// <summary>
/// Color
/// </summary>
/// <remarks>
/// if the index is negative, layer is off
/// </remarks>
[DxfCodeValue(62, 420, 430)]
public Color Color
{
	get { return this._color; }
	set
	{
		if (value.IsByLayer || value.IsByBlock)
		{
			throw new ArgumentException("The layer color cannot be ByLayer or ByBlock", nameof(value));
		}

		this._color = value;
	}
}

this is dxf layer information

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions