Question

Exporting lines from DXF to Excel ordered by location


Badge

I have a string af lines in a DXF with two vertices, top and bottom. What I need is an export to excel that shows top and bottom of the line X,Y,Z in order according to location. It's linework of a sheetwall scan. Customer needs an excel spreadsheet with X,Y,Z for top and bottom of the wall.

 

My problem is I need it sorted/relabelled in some way first, as the lines are not drawn in order from end to end. Is there a way to sort, then export the lines in FME? Maybe by placement in x axis direction. I'm new to FME so it's a learning process for me :)


4 replies

Userlevel 4
Badge +13

Hi @hjort Use a CoordinateExtractor to get the X,Y,Z as attributes, followed by a Sorter to sort by the X attribute - top or bottom.

Badge

@danatsafe Can you keep the lines as coordinatepairs when doing that way? Below is a screenshot of the lines, I need a coordinate from top and bottom as a pair.

Badge +16

Hi @hjort,

Use 2 CoordinateExtractor specifying to extract the first and last coordinate of the line.

If you have a unique ID for the line then this will be preserved and you can use that to write it out per line,

 

Badge

Hi @hjort,

Use 2 CoordinateExtractor specifying to extract the first and last coordinate of the line.

If you have a unique ID for the line then this will be preserved and you can use that to write it out per line,

 

@itay That works for me, thank you. My next issue is the order of vertices, the lines are not drawn in the same direction :/ So if I use Sorter to sort by X position, I will get the lines in the correct order, however since the direction of the lines vary I dont get the correct order of coordinates. I am looking at attributemanager to maybe sort and rename vertices according to elevation, so lowest is first. Does that make sense at all :)

Reply