Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 15 additions & 5 deletions src/ACadSharp/IO/DWG/DwgStreamReaders/DwgObjectReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1040,9 +1040,9 @@ private CadTemplate readUnlistedType(short classNumber)
case "SORTENTSTABLE":
template = this.readSortentsTable();
break;
//case "VISUALSTYLE":
// template = this.readVisualStyle();
// break;
case "VISUALSTYLE":
template = this.readVisualStyle();
break;
case "WIPEOUT":
template = this.readCadImage(new Wipeout());
break;
Expand Down Expand Up @@ -5313,15 +5313,25 @@ private CadTemplate readVisualStyle()

//WARNING: this object is not documented, the fields have been found using exploration methods and matching them with the dxf file

visualStyle.Description = this._textReader.ReadVariableText();
//2 Name
visualStyle.Name = this._textReader.ReadVariableText();
//70
visualStyle.Type = this._objectReader.ReadBitLong();

//177
var value177 = _objectReader.ReadBitShort();
//291 Internal use only flag
var value291 = _objectReader.ReadBit();

//70 Count then repeat 90 and 176
int count = this._objectReader.ReadBitLong();

#if TEST
var objValues = DwgStreamReaderBase.Explore(_objectReader);
var textValues = DwgStreamReaderBase.Explore(_textReader);
#endif

return null;
return template;
}

private CadTemplate readCadImage(CadImageBase image)
Expand Down
5 changes: 5 additions & 0 deletions src/ACadSharp/Objects/VisualStyle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ namespace ACadSharp.Objects
[DxfSubClass(DxfSubclassMarker.VisualStyle)]
public class VisualStyle : NonGraphicalObject
{
/// <summary>
/// Default <see cref="VisualStyle"/> name.
/// </summary>
public const string DefaultName = "2dWireframe";

/// <inheritdoc/>
public override ObjectType ObjectType => ObjectType.UNLISTED;

Expand Down