← All bug reports

FS#2193dwg2csv retains the last encountered custom properties

Type
Bug
Status
Closed
Resolution
Not a bug
Category
Command line tools
Severity
Very Low
Priority
Low
Reported version
Development
Operating system
Windows 7
Reported
2021-03-01 by CVH
Closed
2021-03-08 by andrew

QCAD Professional
Win installer 32 bit
Version: 3.25.2.13 (3.25.2.13)
Internet: QCAD.org
Build Date: Feb 12 2021
Revision: cad2d36
Qt Version: 5.13.2
Architecture: i386
Compiler: Unknown

Andrew,
While enhancing DrawFromCSV: Forum Link.
I had a peek at the new command line tool: dwg2csv

//I would never come up with 115 columns.
That wouldn't be efficient to generate entities from.
Although this way it is very complete and one could use specific lists to filter.
One downside is that the '-list' switch return is far too vast for the windows command line.//

Remarked that:
Only the first alphabetically custom property is listed under:
QCAD:Line & QCAD:Reference (columns 114-115).
And that the last encountered is persistent for all entities that follows.

Maybe this originates from a multiple entity selection ...
... what also retains the last encountered custom properties in the property editor.
Should I add a seperate task for that?

Also had an exception thrown:
Debug: dropped global XDATA (no res buf): "ViewportCenter".
Discarted that as this very basic test drawing hasn't even a Viewport.

Regards,
CVH

Added: Snippet from DrawFromCSV code (merely a test case)

CSVcomma/semicolon
Offset;50;50
Point;39,789355;-0,815325;+[Custom;Reference:101];
Point;38,49526;4,014304;+[Custom;Reference:102;Line:56]

The two points, and only those two points, are casted with custom properties
QCAD|Reference|101
QCAD|Reference|102 & QCAD|Line|56

Added: The dxf file
Added: The csv file (change to the comma/semicolon style)

Comments (3)

andrew 2021-03-01

Please attach the drawing file (DXF, DWG) and indicate the command line arguments used for the tool, thanks.

CVH 2021-03-01

The required files are added to the task.

The used commands in the Windows Command Prompt box:
cd C:\Program Files\QCAD
dwg2csv C:\Users\Admin\Desktop\QCAD_development\DrawTest.dxf

andrew 2021-03-01

I cannot reproduce the problem here.

Here's how I proceed:

dwg2csv -t Point DrawCSVTest.dxf

Output:

Type,Handle,Block,Layer,Linetype,Linetype Scale,Lineweight,Color,Displayed Color,Draw Order,Position:X,Position:Y,Position:Z,QCAD:Line,QCAD:Reference 
Point,0x38,*Model_Space,0,Continuous,1,0.25,#000000,#000000,0,89.789355,49.184675,0,,101
Point,0x39,*Model_Space,0,Continuous,1,0.25,#000000,#000000,1,88.49526,54.014304,0,56,102

This seems correct as there are two points, the first has one custom property:
QCAD:Reference

The other has two:
QCAD:Line,QCAD:Reference

So for the first, the column QCAD:Line is empty.

Please elaborate if you still think there is a bug somewhere. If you get different results, please let me know, thanks.