As an administrator for Bentley Map, you might prefer to create pre-defined connection parameters that can be used with the GDI CONNECT and GDI QUERY keyins. Doing so will enable you to place a library of keyins on a menu bar, custom tool box or function keys. This will streamline production workflows and eliminate errors from incorrectly defined search criteria.
Since GDI keyins do not provide the ability to specify a WHERE clause, the following content describes a workaround that may be of interest if simple search criteria are needed.
In this example, I have a named connection Nash where the property symbologies are defined in the Bentley Geospatial Administrator.
The Parcels feature has a Where Clause defined as (HEATING_FUEL = Electric)
This connection can be saved to an XML file by using Save As XML in the Connection Tools icon bar. While the content of the file is XML, the extension is ORAX.
Once the ORAX files are created, you can use them with the GDI CONNECT keyin:
GDI CONNECT FILE=FileName USER=UserName PASSWORD=Password.
GDI CONNECT FILE=C:\Data\Nash\ParcelsElectric.orax PASSWORD=nash
Note: The ORAX file stores the Oracle OpenParameters which includes the User, Host, Service and Port but not the Password.Optionally the password can be added to the ORAX file. In the XML file add an element for the password using a text editor or XML editor.
To query the just the parcels with the Where Clause, the following keyin can be executed:
GDI QUERY FEATURE=Parcels VIEW 1
To eliminate a datapoint to accept the processing, append the POINT AB keyin.
GDI QUERY FEATURE=Parcels VIEW 1;POINT AB
Note: Care should be taken to ensure that the Apply Where Clause is enabled:
Alternate methods of setting up queries with search parameters might include:
For more information regarding the GDI family of commands, please refer to:
Spatial Database Keyins