Searching for components used in drawings

Hello Friends :sunny: :smile:

I have hundreds of drawings of head controls for irrigation systems. In those drawings I have many components of items such as valves and filters.
I was wondering if there is a way to search multipal drawings that contain specific components?
For example if I want to find all the drawings that contain a certain filter.

There is no immediate way to search things inside multiple files without opening them (like a full-text search in all documents in a directory).

However you could make use of SketchUp’s component library feature and build your own components library. Expand the lower pane of the components browser and drag each component from your current file into your library (but you would still have to open all files one after another). If the files contain only a component each, you could also directly copy them into the library’s directory on disk.

In any case it is crucial that you annotate your components with a meaningful name, or a description or tags. Unfortunately we are not yet in an era where we can search by shape or “looks similar like a valve”, we rely on textual descriptions.

Perhaps this plugin will be of some help.

Usage:Extensions>SDM Tools>Misc Tool>Find Models with Component

Enter the name of the component you want to search for

Navigate to the folder of the models to be checked and select any one of them and click Open

A message box with a list of the models containing the component will display when finished.

Find Models with Component.rb (2.9 KB)


Hi Aerilius, thanks for you reply. I have a components library. It has hundreds of parts in it. The idea is to pull up projects where the part/component is featured.

If my company wants to sell a particular valve or filter and want to show examples of irrigation head controls that they are operating in, I need to find the projects out of hundreds that they are featured.

sdmitch thank you so much - I will download it and try :star_struck::star_struck:

I tried the plugin. Its great for finding components in drawings in one folder, however if there are more nested folders within that folder it will not check them.

Any other ideas?

change one line in the ruby file to search in all sub-directories

# line50 is currently
  models = Dir[fdir+"/*.skp"].map{|m|File.basename(m,'.skp')}
# change to
 models = Dir[fdir+"/**/*.skp"].map{|m|File.basename(m,'.skp')}




will try - thaaaaaank you! :star_struck::star_struck::heart_eyes::heart_eyes::star_struck::star_struck:

Hi John

I have no idea how to open it, to change the text!
What do I do?

a .rb is just a text file, so any good text editor should work…


I tried right clicking on the file to get “open with” to try to open it with windows note pad or something, but it dosnt give me the option. I also tried dragging and dropping it into note pad, that didn’t work either. if I double click on the file, it opens a box asking me how I want to open this file and the option to look in windows app store

what am I doing wrong?

I’m on a mac, so I’m not positive…

notepad should open it…

else, try renaming with as a .txt >> edit >> save >> rename back to .rb?


EDIT: here it is find_models_with_nested_component.rb (2.9 KB)


John is that the file edited as you suggested? oh thank you that’s so sweet!

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.