Skip to main content

Hallo everyone,

 

 

I have a couple of shapefiles (points, lines and polygons) and store them into a single dxf-file. By adding the attribute "autocad_entity" every feature is interpreted correctly and can also store a certain grade of symbology.

 

However, it turned out that all files/layers enter the writer in alphabetical order so that some polygons (made to autocad_hatches) overlay other linear or point layers.

 

I have already tried to give them an additional attribute called "order" which is reffered to in a sorter just before the dxf-writer, but it doesn't seem to work for me.

 

I have also tried the custom transformer FMETypeSorter, but it also doesn't change anything.

 

There's a similar topic on GoogleGroups, but I think it rather refers to the order of features than of layers.

 

Could it be that a NeighborFinder just before the sorter disables the functionality of my sorters? Or do I have to edit the dxf-writer to get correct results. I have also checked different viewers to look at the results.

Maybe anyone of you has an idea. Thanks in advance!

 

Greets,

Andy

Hello Andy

 

 

I'm not 100% sure about layer handling in DXF/DWG but I am sure priority is controlled by sorting the features. I think the sorting works over all layers and layer-order results implicitly from sorting.

 

 

The DXF Viewers I use do NOT allow to reorder the DXF layers as e.g. ArcMap or Mapinfo do.

 

 

Maybe you need to reverse sort order ?

 

 

Michael
Hi Andy,

 

please specify what "doesn't seem to work for me" and "doesn't change anything" mean. Do you see the output ordered but the layers are messed? Or is the sorter not working? It may be bit complicated to see if the dxf is sorted or not, so to test, you may export it to csv and check whether it is sorted correctly.

 

It also may be unsoluble - as it is in MapInfo. Once you have single map file, you cannot manage the order in which MapInfo displays the features.

 

With MapInfo, I often use the solution of setting the polygons transparent so that it doesen't matter when they overlay the lines :-(

 

 

J.

Hi Jaro and Michael,

 

 

thanks a lot for your answers. I'm sorry if my post was a bit unclear. In my results the layers look as destined, but the sorter did not put them in the order it was adressing with my "order" attribute. At least in the FME viewers, AutoCAD and another free DXF viewer. Reversing the sort order also didn't have any effect, the layers all come out of the sorter in alphabetical order according to their name.

 

 

But I'll try to add another writer (CSV as you suggested) in order to check if the problem lies in the sorter or in the writer.

 

Otherwise I'll have to lump it! :)

 

 

Thanks again and greets,

 

 

Andy
Hi

 

 

I don't know how the latest editions of AutoCAD handles the draworder of the features but in prevoius versions you had to use a DRAWORDER command to execute the sorting of features. If not used, the features would draw in random order. (Or maybe the latest on top. I don't remember.)

 

 

I don't think it's possible to set the DRAWORDER i FME, so I'm guessing the "sorting" is from the writer. I don't think there is a guarantiee that AutoCAD wil render the features correctly before the DRAWORDER command is used.

 

 

Try googling AUTOCAD and DRAWORDER

 

 

/Tim

Thank you Tim for your suggestions.

 

I'm currently testing some alternatives and will let you know when I found a solution.
If they always come out in alphabetical order, and you know the order you want them in...could you simply append a "001", "002", "003" etc to the start of the names?
thanks for the relpy, Mitch. Not a bad idea actually 😉 I'll try.
I think there's something wrong with my writer. Even if I change the autocad_layer attribute just before the writer, the names of the output layers is equal to the name of the input dataset.

 

http://www.fotos-hochladen.net/uploads/autocadwriterzu8x0bnlfr.png

 

 

Do I miss a point?

Reply