Find all 3D or 2D DGNs in your ProjectWise Datasource

Have you ever been wondering how many 2D or 3D drawings your datasource contains? If so, this post might help you.

Although it is not something straightforward that you could achieve through standard PW Search. Almost. Lets search all our 3D drawings.

A 3D drawing must contain a 3D model. If you use ProjectWise Automation Services, you can get your DGNs indexed which will list all the models and their types (please refer to ProjectWise Implementation Guide to find how to setup and run Automation Services).

Once you setup and run an Automation Service job for indexing your selected DGNs (folders or single documents) – everything you need for finding 3D DGNs are inside ProjectWise database once the job has finished.

Now you can run a Search Builder in ProjectWise Explorer and look for documents by their GUIDs. All the hard searching work will be done by the following query:

$FIELD$ in (select distinct DOC_GUID from EC_INDEXDOCINFO, ec_index,I_DGN_MODEL where DgnModel_Is3D='yes' and EC_INSTANCEID=INSTANCE_ID and DOCINFOID=INDEXDOCINFOID)

That’s it! If you want to reverse the search and look for 2D drawings, use the same query, but instead of criterion ‘yes’, leave it empty ‘’.

You can also make it Saved Search for your easier further usage.

Anonymous
  • Hi Oto,

    I guess you could then use the similar method line Darius mentioned - use the query in the Search Builder. Just the query would be a little bit different in case when you want to find the dgn model names.

    It should be like:

    $FIELD$ in (select distinct DOC_GUID from EC_INDEXDOCINFO, ec_index,I_DGN_MODEL where DgnModel_Name like 'defaul%' and EC_INSTANCEID=INSTANCE_ID and DOCINFOID=INDEXDOCINFOID)

    As you see I have used the Model Name: 'defaul%'

    This way it searches all the models that name begins with 'defaul'.

    This way you can add the saved searches for some certain model names in PW and users can then use them.

  • Thanks. At last it works. This saved our project as inability ti search by Model name would render Projectwise implementation unusable.

    Only two issues:

    1) How to add this as saved search so it is more user friendly?

    2) How to do a partial search because for example searching Model "Defau*" doesn't find anything?

    Actually searching by Model name could be explained in separate Blog article as it is common question.

  • Hi Oto,

    Yes, it is possible to search by the model name. To do that you still need to run the Automation services to extract all the data from the drawings.

    After you have the data extracted you need to make some modifications in the ProjectWise Class Editor (it is a part of ProjectWise Administrator installation and you can find it in Start menu -> All Programs -> Bentley -> ProjectWise -> Administrative Tools -> ProjectWise Class Editor). When you will open it please expand the Attributes folder and find: DgnModel_Name

    In the settings of this attribute you need to change the Visibility to Visible. This will add the DGN Model name to the search parameters. And add the Display Text (for example: Model Name).

    After this please restart the ProjectWise Explorer, log in to the datasource. Now if you will right click on the Components you will see the option Find Instances. Please select the Class: DgnModel and click Define (next to the Criteria). In the Define Criteria window select Attribute: Model Name (the one that we defined in Class Editor) and add any value (Model name that you want to find). Click OK on the criteria definition and click Find Now. It will find you all the model names according to the parameters that you entered.

    After you have the models in the list you can double click them and you will see what document has the model.

  • Is it also possible to search by model name?