Skip to main content
Question

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

  • Mar 3, 2015 10:12 PM UTC
  • 5 replies
  • 77 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
  • Mar 4, 2015 4:42 AM UTC
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
  • Mar 4, 2015 5:17 PM UTC
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
  • Mar 4, 2015 5:34 PM UTC
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
  • Mar 5, 2015 11:14 AM UTC
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
  • Mar 5, 2015 4:28 PM UTC
You don't need to explode the entity to acces it.