Importing DXF entities

1
Alain
5/16/2019 8:44 PM

Hi,

It seems I'm once more faced with my lack of ACAD/DXF knowledge... We are attempting to import DXF entities into our application, but we are struggling. When we loop through entities, they all seem to be saved at a 0,0 coordinates, thus having all lines/polylines/etc. overlapping themselves in our imported drawing.

I've read in other post on this forum that entities have no position, but then what is the property that stores their position? And how can we read it?

Thanks in advance!


Alain

Wout
5/16/2019 8:48 PM

For each entity it's different, a line has a start and end point, a circle has a center and a radius, etc.

- Wout

Alain
5/16/2019 9:28 PM

I'm probably not making myself clear.

I understand the difference between entities, and their specific properties.

We have a simple DWG file with two polylines. When our code reads the entities, both polyines have their first point set at (0,0), while they are clearly at seperate positions in the DWG files.

See attached image: the black part is the source DWG viewed in ACAD, the grey one is the imported resut.

Wout
5/16/2019 9:45 PM

I can't really provide an answer without any information.

- Wout

Alain
5/17/2019 12:10 PM

Well, we figured out what was going on: it was our code...

Sorry about that!

Cheers,


Alain

1