Description
When I created a DXF or DWG file by adding WIPEOUT or IMAGE entities, the files displayed correctly when opened in AutoCAD. However, when opened with "DWG TrueView," a free tool from Autodesk, the DWG files did not display these entities, and the DXF files resulted in an error and could not be opened. After some investigation, I found that the cause was likely the values such as 281 and 91 defined in the CLASS section for WIPEOUT and WIPEOUTVARIABLES. Therefore, just before passing the CadDocument to the Writer, I tried to modify the class values as shown below.
foreach (var cadClass in doc.Classes)
{
if (cadClass.DxfName.Equals("WIPEOUT", StringComparison.CurrentCultureIgnoreCase)
|| cadClass.DxfName.Equals("IMAGE", StringComparison.CurrentCultureIgnoreCase))
{
cadClass.IsAnEntity = true;
cadClass.InstanceCount = 1;
}
else if (cadClass.DxfName.Equals("WIPEOUTVARIABLES", StringComparison.CurrentCultureIgnoreCase)
|| cadClass.DxfName.Equals("IMAGEDEF", StringComparison.CurrentCultureIgnoreCase))
{
cadClass.InstanceCount = 1;
}
}
However, this change was not applied during output, and in the resulting DXF file, both group codes were set to 0. Is it not possible to modify the values in the CLASS section in this way? If I do want to change them, how should I go about it?
For reference, up to version 1.1.6, changes to IsAnEntity were applied correctly. However, InstanceCount remained at 0. In version 1.1.19, neither of the changes is applied.