The GDI family of commands provides access to Bentley Map interoperability and spatial database key-ins. The following table is from Bentley Map help file and is subject to change.
Key-in
Required arguments
Optional arguments
Notes
GDI CONNECT FILE
file=fileName
user=userName password=password
Workspace configuration variables can be used of the form $(VarName)
GDI CONNECT GRAPHICALSOURCE
name=graphicalSourceName
If a name is not provided, then an attempt will be made to connect to the first graphical source.
GDI CONNECT ORACLE
user/password@host:port/database
user/password@host/database
user/password@service
-
Service is the TNS Service name
user=userName password=password host=hostName
database=databaseName
port=portNumber
User and password are optional if using Windows authentication
service=serviceName
User and password are optional if using Windows authentication.
GDI CONNECT SQLSERVER
user/password@host:database
host:database
If using Windows authentication, use the second form.
e.g. gdi connect sqlserver localhost\SQLEXPRESS:EastCity
GDI CONNECT WFS
user/password@url
user/password@url|namespace
url is the only required parameter, so you could have a connect string like @myurl.mydomain.com
url=url namespace=namespace
url is the only required parameter
For QUERY, POST, DISCARD, LOCK, UNLOCK, ERASE statements
feature=feature1,feature2,…
applywhere=true|false
A list of features to act upon
whether or not to apply the where clauses (default: true)
GDI QUERY
all
fence
view viewnum
Queries the selected features described in the Map Connections interface. A spatial qualifier needs to be present. If not, you will be prompted through the standard interface. If All is specified then all selected features in the open connection will be queried. If either of the optional spatial qualifiers (fence or view) are present then the query will be restricted to that fence or view.
GDI LOCK
Not valid for WFS data sources
selection
refresh=true|false
This will lock the features specified by the defined spatial qualifier.
whether or not to refresh features (default: false)
GDI UNLOCK
discard=true|false
This will unlock the features specified by the defined spatial qualifier
whether or not to discard changes (default: false)
GDI POST
continue=true|false
This will post all changed features subject to any partial posting variables and settings
whether or not to continue on error (default: true if GDI_PARTIAL_POSTING is set, false otherwise)
GDI DISCARD
retain=true|false
This will discard all changes made to any spatial features since the last lock or post process.
whether or not to retain locks (default: false)
GDI ERASE
This will erase from the local DGN cache all features queried from the spatial data source. The erased features are specified by the defined spatial qualifier
GDI DISCONNECT
Disconnect from the current graphical source
Note: Make sure there are no spaces before and after the = sign in the above key-ins.