Skip to main content
Question

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


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

5 replies

takashi
Evangelist
  • 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.

  • Author
  • 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
Evangelist
  • 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.

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings