Skip to content

Commit

Permalink
dxf write byte array fix
Browse files Browse the repository at this point in the history
  • Loading branch information
DomCR committed Oct 26, 2023
1 parent 05473f0 commit ad87ebf
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ACadSharp/IO/DXF/DxfStreamReader/DxfObjectsSectionReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,11 @@ private bool readXRecord(CadTemplate template, DxfMap map)

//TODO: Finsih cadXrecordtemplate

if(template.CadObject.Handle == 0xBEA)
{

}

switch (this._reader.Code)
{
case 100 when this._reader.ValueAsString == DxfSubclassMarker.XRecord:
Expand Down
1 change: 1 addition & 0 deletions ACadSharp/IO/DXF/DxfStreamWriter/DxfAsciiWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ protected override void writeValue(int code, object value)
{
this._stream.Write(string.Format("{0:X2}", v));
}
this._stream.Write(Environment.NewLine);
return;
}

Expand Down
6 changes: 6 additions & 0 deletions ACadSharp/IO/DXF/DxfStreamWriter/DxfObjectsSectionWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ protected void writeObject<T>(T co)
case SortEntitiesTable:
case Scale:
case VisualStyle:
//case XRecrod: //TODO: XRecord Understand how it works for the reader
this.notify($"Object not implemented : {co.GetType().FullName}");
return;
}
Expand Down Expand Up @@ -238,6 +239,11 @@ private void writeSortentsTable(SortEntitiesTable e)

protected void writeXRecord(XRecrod e)
{
if (e.Handle == 0xBEA)
{

}

this._writer.Write(DxfCode.Subclass, DxfSubclassMarker.XRecord);

foreach (var item in e.Entries)
Expand Down

0 comments on commit ad87ebf

Please sign in to comment.