3

I am trying to replace the geometry of an autocad mtext object with the insertion point of a block & output it to an ESRI shapefile. The property fme_geometry for both input mtext & block is fme_point. BLOCK_INSERTION_POINTS is what the extractor destination and the replacer source is. Here's the workbench, the mtext is coming from the top, the block from the bottom:

enter image description here

The final shapefile output gives me the correct block insertion points as point features (4 in this case) but without the text attributes I created attached to them, and four more features that have no geometry (fme_geometry = undefined) but do contain the correct text attributes, it looks like this:

enter image description here

The two inspectors in the FME workbench screen capture at top give the following output:

enter image description here

I must be missing something about how GeometryReplacer works or FME is handling the mtext objects, but what?

1

I think the issue is that you want 4 output features but are getting 8. In the GeometryReplacer you are expecting the 4 features from each stream to merge together - but that is not what will happen.

What will happen is that the features are merely accumulated (like a queue of 4 people merged with a queue of another 4 people results in a queue of 8 people).

What you need to do is use a transformer that will merge the data together.

If there is a common ID number between the two objects that need connecting, I suggest using a FeatureMerger instead of the GeometryReplacer. The output from the GeometryExtractor should connect to the FeatureMerger:Requestor port and the output from the StringSearcher should connect to the FeatureMerger:Supplier port. Then in the parameters set the ID numbers as the attributes to join by.

If there is no common ID, and you want the blocks to get the attributes from the nearest text, then use the NeighborFinder transformer. It does a similar join but spatially, not by an attribute ID.

Either way the GeometryExtractor and GeometryReplacer are not likely to be the transformers you need.

  • There is no common ID and I can't use neighbor finder because the arrangement of the labels is too jumbled & erratic but there is a common geometry between the two objects I need to connect: a line that touches them at each end. The line touches a box containing the text I need at one end, and a block representing the feature I need to connect the text to at the other end. I made a workbench that takes a line, finds the box it touches, finds the text in said box, finds the block it also touches, and there doesn't seem to be any way I can tie them together from there. – Alpheus Apr 4 '17 at 17:39
  • Send what you've got to the FME support team (safe.com/support) and they will be able to help you finish it off. It sounds like you are fairly close to a solution, but I think it will be easier to assist you if we can see what you currently are doing. – Mark Ireland Apr 6 '17 at 15:12
  • Thanks but I got it working with CoordinateExtractor, VertexCreator & FeatureMerger. Where I fed the extracted coordinate for the block (into the workflow branch that figures out which text goes with which block) made the difference between FeatureMerger working or failing. It worked when I fed it into the start of the branch, but failed when I fed it in anywhere else in the branch. Not sure should be since the branch doesn't do anything with the coordinate until it reaches the end. – Alpheus Apr 10 '17 at 19:51
1

When you load your DXF you need to set the Parameters to pull out the information you require then you can manipulate the data in FME to what you require.

For MTEXT >Explode MText Entities

enter image description here

Also expose autocad_text_string to get to your attributes

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.