dxf not viewable in Voloview

Please use this forum to post feedback and suggestions related to dxflib.

Moderator: andrew

Post Reply
alvinpenner
Newbie Member
Posts: 4
Joined: Sun Oct 19, 2008 11:33 am

dxf not viewable in Voloview

Post by alvinpenner » Sun Oct 19, 2008 11:52 am

First of all, thank you very much for an excellent product!
However I have a minor technical problem. I originally tried out the demo version of QCad which used dxflib 2.1.2.0. The dxf files from it were viewable in my favorite viewer, which is Voloview Express 2.01.
Then I purchased a registered copy of QCad which uses dxflib 2.2.0.0. The files produced by this version of QCad are not viewable by Voloview Express, so QCad is not of much use to me now.
Comparing the two sets of files it appears that the problem lies in a new attribute 420 that was added in the meantime. This attribute has the value 16777215 = FFFFFF in hex. The section that contains this attribute is shown below, roughly line 900 in the dxf file.
Would it be possible to investigate this to resolve the issue, since compatibility with AutoCAD is essential to me.


0
LAYER
5
10
100
AcDbSymbolTableRecord
100
AcDbLayerTableRecord
2
0
70
0
62
7
420
16777215
6
CONTINUOUS
370
0
390
F
0
ENDTAB

alvinpenner
Newbie Member
Posts: 4
Joined: Sun Oct 19, 2008 11:33 am

Post by alvinpenner » Sun Oct 19, 2008 2:29 pm

just a quick follow-up. I see now that attribute 420 is a color attribute, which is the reason for the value of FFFFFF, which would be 'white'. This attribute shows up in individual ENTITIES as well if one specifies a color. However, the problem is that first of all it leads to a file that is not viewable, and secondly it is redundant because the same color information is being stored in the attribute 62 as well. For example
red yields attribute 62 = 1, attribute 420 = FF0000
green yields attribute 62 = 3, attribute 420 = FF00
blue yields attribute 62 = 5, attribute 420 = FF

If I go through the dxf file and delete all references to attribute 420 then the file is viewable in Voloview and still has color associated with each entity.

User avatar
andrew
Site Admin
Posts: 9019
Joined: Fri Mar 30, 2007 6:07 am

Post by andrew » Sun Oct 19, 2008 4:46 pm

You might want to export files as DXF R12 instead of DXF 2000.
The attribute 420 was introduced in DXF 2000 for 24bit color support.

alvinpenner
Newbie Member
Posts: 4
Joined: Sun Oct 19, 2008 11:33 am

Post by alvinpenner » Sun Oct 19, 2008 6:01 pm

thanks for the quick response.

unfortunately I cannot use R12 because I need to have access to the excellent spline curve that came out in R13. I am doing data conversions from .dxf to .svg for the Inkscape program and the spline is indispensible.

As to the attribute 420, it does not appear to be present in dxflib 2.1.2.0 which does support DXF 2000 (AC1015). This attribute was introduced fairly recently, in dxflib 2.2.0.0.

I guess my question is, would it not be possible to introduce this attribute in such a way that the file would still be viewable by Voloview, since this is a standard Autodesk viewer, and quite popular in the industry I am in?

User avatar
andrew
Site Admin
Posts: 9019
Joined: Fri Mar 30, 2007 6:07 am

Post by andrew » Sun Oct 19, 2008 6:14 pm

If your question is only about dxflib (not QCAD) then you might simply want to remove the code in dxflib that produces the 420 code to solve the problem you are having:

dl_writer.h:
Line 337:
dxfInt(420, attrib.getColor24());

dl_dxf.cpp:
Line 3317:
dw.dxfInt(420, attrib.getColor24());

Note that this will limit the colors of your DXF to the 256 colors in the DXF palette.

alvinpenner
Newbie Member
Posts: 4
Joined: Sun Oct 19, 2008 11:33 am

Post by alvinpenner » Sun Oct 19, 2008 6:25 pm

thanks, I'll check it out. I have downloaded the source code but haven't yet looked at it.
actually, I guess my question actually is about QCad, since that is what I am using, is there a more appropriate place for me to post this question, rather than here?

Post Reply

Return to “dxflib Suggestions and Feedback”