Skip to main content
Question

Writing multiple features dynamically to dwg

  • October 23, 2018
  • 2 replies
  • 124 views

bjudes
Enthusiast
Forum|alt.badge.img+10

Hi

I am trying to write to dwg dynamically. I have 5 different features River, Pond, Canal, Canal Lock and Canal Harbour. I want to merge the 3 canal features (Canal, Canal Lock and Canal Harbour) into Canal and then write dynamically so I get a single DWG file with River, Pond and Canal, but of course I get the Canal Lock and Canal Harbour now under the alias of Canal. Is this possible, hope it makes sense?

Thanks

B

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

davideagle
Contributor
Forum|alt.badge.img+22
  • Contributor
  • 578 replies
  • October 23, 2018

Hi @bjudes, if by 'features' you mean featuretypes or layers, called Canal, Canal Lock and Canal Harbour then there is a nice identifier you can use to help. Put an AttributeExposer on the canvas and expose the attribute fme_feature_type, now add an AttributeValueMapper and set it up so that when fme_feature_type is equal to "Canal Lock", replace it with "Canal". You could also use an AttributeManager with a conditional statement for this or say a Tester to look in the fme_feature_type attribute using a regex, where the string is ^Canal, which filters off everything that you can then use an AttributeCreator to set the fme_feature_type to the new layer name.

If however, your features are individual objects then you'll need to look for another identifier to filter them on like the autocad_block_name which you can then use to ultimately adjust the fme_feature_type attribute. When the feature hits the writer with the new fme_feature_type value it will be written to the new layer name.

Hope that helps, Dave


bjudes
Enthusiast
Forum|alt.badge.img+10
  • Author
  • Enthusiast
  • 117 replies
  • October 25, 2018

Hi @bjudes, if by 'features' you mean featuretypes or layers, called Canal, Canal Lock and Canal Harbour then there is a nice identifier you can use to help. Put an AttributeExposer on the canvas and expose the attribute fme_feature_type, now add an AttributeValueMapper and set it up so that when fme_feature_type is equal to "Canal Lock", replace it with "Canal". You could also use an AttributeManager with a conditional statement for this or say a Tester to look in the fme_feature_type attribute using a regex, where the string is ^Canal, which filters off everything that you can then use an AttributeCreator to set the fme_feature_type to the new layer name.

If however, your features are individual objects then you'll need to look for another identifier to filter them on like the autocad_block_name which you can then use to ultimately adjust the fme_feature_type attribute. When the feature hits the writer with the new fme_feature_type value it will be written to the new layer name.

Hope that helps, Dave

 

Thanks Dave, this worked perfectly. You are a great help. B