title: select all objects based on selecting one object in blender/python
body: <p>Im both new to python and blender. I want to create an addon that will select all objects based on the selection of one object. I have a model with over 600 parts and a lot are duplicates. I can use the select pattern function code but that relies on manually entering the name of the part. I would like to click the part and then press a button within the addon that will select all other parts with the same name.</p>
  <p>at the moment I am selecting all parts within the python text editor by running:</p>
  <pre><code>bpy.ops.object.select_pattern(pattern=&quot;ifcBeam/endParapet*&quot;)
  </code></pre>
  <p>this lets me select all but what I would like is to have a string populate with the selection of a part.</p>