Question

DWG with OD to shapeFiles


Badge

Hy,

I try to convert a DWG with OD to shapesFiles.

All the OD block from the DWG are lost...I try some versions with area builder or a choper or a donut builder...

Thanks for your help


18 replies

Userlevel 2
Badge +17

Hi @njbhvg,

By default, FME's DWG readers will automatically explode blocks into their component geometry. If you are writing to Shape, you most likely want to keep only the block insert points. To do this, please set the AUTOCAD_OD reader parameter 'Explode Blocks into Entities' to 'No'.

If you want to explode some blocks, but not all of them, you can also set reader parameter 'Explode Selected Blocks'.

Badge

I allready try "NO" but at the end the block polygon deseapear. And if you open the result on Qgis you have only the none bloc polygons.

Badge +2

Hi,

Just a guess

It may be case of 32-bit and 64-bit because 32-bit FME won't allow OD tables and it may have ignored all the blocks.

Pratap

Badge

Hi,

Just a guess

It may be case of 32-bit and 64-bit because 32-bit FME won't allow OD tables and it may have ignored all the blocks.

Pratap

If you look the result you will see that OD is present for everything except the bloc

 

 

Badge +2
If you look the result you will see that OD is present for everything except the bloc

 

 

You have passed "Yes" in "Explode Block to Entities" parameter so all blocks will be exploded.

 

If you want blocks as point features in target then you have to pass "No"

 

If this reply does not answer your question then kindly reframe your question to understand further

 

 

Badge
You have passed "Yes" in "Explode Block to Entities" parameter so all blocks will be exploded.

 

If you want blocks as point features in target then you have to pass "No"

 

If this reply does not answer your question then kindly reframe your question to understand further

 

 

I try to test No, but as I already said, nothing change.

 

If you look the final result you can see that the block have diseapear.

 

 

Badge

To sum up,

I choose to make yes to explode the block and I add a DonutBuilder at the end.

But I lost the OD data for the bloc I explode. How can preserve it?

plu-oppede.fmwt

Badge +2

To sum up,

I choose to make yes to explode the block and I add a DonutBuilder at the end.

But I lost the OD data for the bloc I explode. How can preserve it?

plu-oppede.fmwt

I request you again to reframe the question because

 

1. the writer "84086_ZONE_URBA_20180323" has geometry with "shape_first_feature" which is not clear which geometry you are passing

 

2. We dont have any source data in which you are working to understand the exact requirement

 

3. You have merged to features in the question. It has been metioned as "OD Block" in the question but OD (Object data) is a table and block is a point feature in AutoCAD dwg file

 

 

Either you upload sample data to understand the question/requirement or post the question clearly to understand.

 

 

Further suggestion based on sumup, When you explode, blocks will be split into texts, polygons, lines and points but shape file will accept 1 type of geometry in one shape file so define which geometry you want in writer. Regarding OD table (attributes) after Donut builder, you have to use attribute accumlation to get attribute further. So, try using autocad_block_name and autocad_block_number in groupby field to get same attributes in translation
Badge

Ok, I try to be more explicit.

I give you all the sources, the DWG and the workbench.

I chose to explode the blocks and create a "donut builder". My problem is as I explode the blocks, I lose my object data. How to keep this data? Or how to recover after decomposition?

Badge +2

Ok, I try to be more explicit.

I give you all the sources, the DWG and the workbench.

I chose to explode the blocks and create a "donut builder". My problem is as I explode the blocks, I lose my object data. How to keep this data? Or how to recover after decomposition?

Hi,

 

Thanks for the data and workbench to review.

 

Seems AutoCAD doesnot have capability to retain the table after exploding the block.

 

I was surprised on this new point but learnt new thing today.

 

 

But there is an alternative approach in FME...

 

1. Add 2 readers one with exploding and other with not exploding the blocks

 

2. Later you merge both with feature merger to get the attributes (make sure you should have unique block name for each block in dwg file)

 

 

Thank you
Userlevel 2
Badge +17

Hi @njbhvg,

The object data is currently stored only on the block insert point, rather than the exploded components. We are working to improve the reader to add the object data to all the components as well

In the meantime, please merge the object data from the insert point onto the components with a FeatureMerger, merging by autocad_block_number. I am attaching a modified workspace to illustrate this.

19109-test.fmw

Badge +2

Hi @DaveAtSafe,

This seems to be the same suggestion as I suggested but seems you have used only single reader.

Could you kindly explain which settings we have to change to get both exploded blocks and non-exploded blocks from same reader...

Thank you

Userlevel 2
Badge +17

Hi @DaveAtSafe,

This seems to be the same suggestion as I suggested but seems you have used only single reader.

Could you kindly explain which settings we have to change to get both exploded blocks and non-exploded blocks from same reader...

Thank you

There is an 'Preserve Insert Points' parameter on the DWG readers. If you set it to Yes, the block insert point will be provided as well as the block components.

 

 

Badge +2
There is an 'Preserve Insert Points' parameter on the DWG readers. If you set it to Yes, the block insert point will be provided as well as the block components.

 

 

Hi,

 

Thank you
Badge

Hi @njbhvg,

The object data is currently stored only on the block insert point, rather than the exploded components. We are working to improve the reader to add the object data to all the components as well

In the meantime, please merge the object data from the insert point onto the components with a FeatureMerger, merging by autocad_block_number. I am attaching a modified workspace to illustrate this.

19109-test.fmw

Thanks again, it works great

 

 

Badge +3

@njbhvg

I see that the holes also hold features with the same shape as the hole, some with OD.

When reading the file the larger multihole areas (which are blocks) come out as a non-donut, whether exploded or not. And it (blocks) indeed loses its OD. Which seem to be not correct behavior (to me).

the larger area has its boundary also duplicated. And those are not closed.

Maybe some clean-up required?

Or try export as shape, using MAPEXPORT. (or was it a mapimport in the first place?)

Badge
There is an 'Preserve Insert Points' parameter on the DWG readers. If you set it to Yes, the block insert point will be provided as well as the block components.

 

 

Hi, I have another problem with this case. You can see that the little polygon UA2 inside the donut deaseaper in the south inside the zone UC4.

 

I don't understand why whereas all other case its works great...

 

 

Thanks again

 

dwg-to-shape-cnig.fmwt

 

Userlevel 2
Badge +17
Hi, I have another problem with this case. You can see that the little polygon UA2 inside the donut deaseaper in the south inside the zone UC4.

 

I don't understand why whereas all other case its works great...

 

 

Thanks again

 

dwg-to-shape-cnig.fmwt

 

Hi @njbhvg,

 

The Drop Holes setting in the DonutBuilder is set to 'Yes', so that polygon is being dropped. If you change to 'No', the UA2 polygon will be retained.

 

Reply