Skip to main content
Skip table of contents

Running AddExtractedTextFromEngineeringDrawings

Description

After an initial crawl of the engineering files has been completed and an index generated, the Bentley MicroStation Add-in for Shinydocs Cognitive Suite allows you to extract data from those engineering files and update the index with that data using the operation AddExtractedTextFromEngineeringDrawings.

For example, in the following engineering drawing, Shinydocs MicroStation Add-in can automatically extract the Drawing Number (P-I-453-12BN) – or another data element within the drawing – and add it to the index where:

Field = Drawing Number; Value = P-I-453-12BN

Step-by-Step

Prerequisite

Prior to running Shinydocs MicroStation Add-in, ensure that the following has been completed:

Shinydocs MicroStation Add-in is query based and can only operate after an initial crawl of the metadata has been completed and an index created.

Running the command

Open the Command Line Interface for the Cognitive Toolkit.

Run the command: AddExtractedTextFromEngineeringDrawings. To run the command, provide the following parameters to the runscript tool:

OPTION

VALUE

CONDITION

--source-settings <VALUE>

The settings file

Optional

*If not included, default: filesystem

--path-to-micro-station <VALUE> 

 

Fully Qualified Path to MicroStation

 

Optional

*If not included, default: C:\Program Files\Bentley\MicroStation CONNECT Edition\MicroStation\microstation.exe

-q|--query <VALUE>

The search query (File or JSON input)

Required

-n|--nodes-per-request <VALUE>

Number of nodes per request.

For recommendations on setting this number value, see Setting the "--nodes-per-request" option

Optional

*If not included default: 1000

--skip-errors

Skip re-processing errors

Optional

*If not included

default: false

-u|--index-server-url <VALUE>

URL of the index server

Required

-i|--index-name <VALUE>

Name of the index

Required

-t|--threads <VALUE>

Number of parallel processes to start

For recommendations on setting this number value, see https://shinydocs.atlassian.net/wiki/spaces/SHINY/pages/2356117520

Optional

*If not included default: 1

--force

Forcefully remove / Suppress prompt for confirmation

Optional

*If not included default: false

--dry-run

Runs everything but doesn’t send nodes to index

The --dry-run option allows you to quickly see how many items will be processed without actually creating the index.

Optional

*If not included default: false

 -s|--silent

Turn off the progress bar

Optional

Example:

CognitiveToolkit.exe AddExtractedTextFromEngineeringDrawings --query "C:\match_all.json" -u "http://localhost:9200" -i "shiny_index"

Query file

The query file is a JSON file that uses the standard ElasticSearch query language. By surrounding a field in curly braces, the AddExtractedTextFromEngineeringDrawings will replace that term with the value of that field instead.

Query Example

CODE
{
  "match_all" : {}
}
Visualizer

The AddExtractedTextFromEngineeringDrawings command leverages Bentley MicroStation to allow you to extract data from your engineering files and update the index with that data. Standard fields [text and title block metadata (name value pairs)] can be extracted from:

  • .dwg (AutoCAD) engineering drawings

  • .dgn (MicroStation) engineering drawings

In the following example, the Drawing Number “P-I-453-12BN” was assigned to the prop-drgno field.

All block attributions have a key value pair and will be assigned to the proper field in the index.

Any extractions that are NOT block attributions or are lacking a tag/value pair, will be included in the fullText field of the index.

In the example below, the extraction “U-APC2” has been added to the “fullText” field of the index in the left panel.

Congratulations! Now that all of the engineering drawing extractions are in the index, they are fully searchable!

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.