The changes to the InstanceCount property of DxfClass are not reflected in the output. · Issue #664 · DomCR/ACadSharp · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
The text was updated successfully, but these errors were encountered:
There is a flag in the CadWriterConfiguration which sets if you want to reset the dxfClasses, but the way it works seems to be wrong if the instance count is relevant for some software.
If you are using the repo, you can check the method DxfClassCollection.UpdateDxfClasses and change the method AddOrUpdate which modifies the collection, if the dxf class exist it only overrides the InstanceCount, which it would be always 0 because is not counting the objects in the document.
I'll open a PR to fix this issue and set the instance count as it should.
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.
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.
The text was updated successfully, but these errors were encountered: