Skip to main content
Question

create a list of drawings where a certain text string is found

  • March 3, 2015
  • 5 replies
  • 27 views

arainey
Contributor
Forum|alt.badge.img
create a list of drawings where a certain text string is found
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.

5 replies

takashi
Celebrity
  • March 4, 2015
Hi,

 

 

Not sure what the exact requirement is.

 

If you need to select features whose attribute contains a certain text string, one of these transformers might help you.

 

- Tester with "Contains" (or "Matches Regex") operator

 

- StringSearcher with an appropriate regular expression

 

 

We could think of more suitable solution, if you explain a little more detailed requirement.

 

 

Takashi

gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • March 4, 2015
I think he means reading directories and doing a stringsearch on filenames on certain filetype(S).

 

Directoryfilepath reading etc.

arainey
Contributor
Forum|alt.badge.img
  • Author
  • Contributor
  • March 4, 2015
Thank you for your responses.

 

 

Sorry my original post was pretty vaugue, for some reason the site would only let me fill out a subject line yesterday.

 

 

Anyhow, moving on, here's my situation:  I have a directory (including sub-directories) of about 30,000 or so .dwg files, and I need to generate a list of what I'm guessing will be about 1500 of those dwgs that contain "ABCDEFG" (example) in a text entity (could be mtext, could be dtext, need to search both).

 

 

I think I've got the searching the drawing for the text down, the problem seems to be scaling this up to 30,000 drawings and/or generating the list.

takashi
Celebrity
  • March 5, 2015
Possibly the required procedure is:

 

 

Add a dwg reader to the workspace

 

- set the root directory to the Dataset with the advanced browser,

 

- check the "Subfolders" checkbox, so that the reader reads every dwg dataset in the root directory and its subfolders,

 

- select "Single Merged Feature Type" to create a merged feature type,

 

- set "yes" to the "Explode MText Entities" parameter ("yes" is default setting for the parameter).

 

 

 

Expose these format attributes on the reader feature type.

 

"autocad_entity"

 

"autocad_text_string"

 

"fme_dataset"

 

Then, filter the features whose entity name is "autocad_text" and also the text string contains "ABCDEFG", and select features for unique file path.

 


gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • March 5, 2015
You don't need to explode the entity to acces it.