Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
OpenCities Map
  • Product Communities
  • Geospatial
  • OpenCities Map
  • Cancel
OpenCities Map
OpenCities Map Wiki - Key-ins for interacting with spatial databases
    • Sign In
    • -OpenCities Map Wiki
      • -OpenCities Map
        • - End of Support for Bentley Map V8i (SELECTseries) products
        • +Release Information
        • +Installation Information
        • +Getting Started
        • +Administration
        • +General Topics
        • +Geospatial Administrator
        • +Feature Definitions and Inference Rules
        • +Interoperability
        • -Spatial Databases
          • - 3D arcs being stroked when posted and queried
          • - Angle of queried point feature is wrong
          • - Conflict Inspector
          • - Convert DGNs with MSLinks to MS SQL Server Spatial via FME
          • - Create domain lists in Microsoft SQL Server Spatial or Oracle
          • - Create XFM DGN file using Import from database
          • - Creating a Map schema for spatial features
          • - Creating Oracle Spatial multi-table views
          • - Creating Oracle Spatial Views
          • - Data streaming
          • - Data streaming and the Data Browser
          • - Date field settings for use with PBA in SQL Server
          • - Determine which features are locked and modified
          • - Difference between Erase and Delete for removing spatial database features
          • - Disable Connect to Database dialog
          • - Esri File Geodatabase as a Graphical Source
          • - Establish database connection upon startup
          • - Item names showing __x00##__
          • - Keep connection to database open when changing files
          • - Key-ins for interacting with spatial databases
          • - Key-ins to created queries incorporating a simple WHERE
          • - Long transactions - Versioned optimistic transactions
          • - Non planar polygon posting error ORA-54505
          • - Oracle views in spatial feature definitions
          • - Plane Constraint settings
          • - Register features times out with error
          • - Saving connection parameters to settings file
          • - SQL Server Features Not Displaying in Bentley Map
          • - Supported OGC geometry types
          • - Using joins to create custom searches
          • - WFS graphical source connection and feature registration
          • - Connecting to ArcGIS Server
        • +Spatial Analysis
        • +3D Geospatial
        • +Geographic Coordinate Systems
        • +Troubleshooting
        • +Freeware - Utilities - Applications - Programs
        • +Advanced Map Finishing
      • OpenCities Map Ultimate for Finland CONNECT Edition x64 (SES)
      • OpenCities Map Ultimate for Finland CONNECT Edition - Suomi
      • Bentley Descartes
      • +Other Geospatial Products

     
     Questions about this article, topic, or product? Click here. 

    - Key-ins for interacting with spatial databases

    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. 

    Spatial Database Key-ins

    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

    user=userName password=password

    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

    GDI CONNECT ORACLE

    user=userName password=password host=hostName

    database=databaseName

    port=portNumber

    User and password are optional if using Windows authentication

    GDI CONNECT ORACLE

    user=userName password=password

    service=serviceName

    -

    User and password are optional if using Windows authentication.

    Service is the TNS Service name

    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 SQLSERVER

    user=userName password=password host=hostName

    database=databaseName

    -

    User and password are optional if using Windows authentication

    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

    GDI CONNECT WFS

    url=url namespace=namespace

    user=userName password=password

    url is the only required parameter

    GDI CONNECT GDB gdb file name The path can contain spaces.
      dir   When using the dir argument, add double quotes for paths with spaces. For example, gdi connect gdb dir="d:\New Folder\MyFeatures.gdb". This is also true when variables are used to define paths with spaces such as MAPGBD=d:\New Folder\. In that case, use the following: gdi connect gdb dir="$(MAPGDB)MyFeatures.gdb"
           
           

    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

    all

    fence

    view viewnum

    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

    Not valid for WFS data sources

    all

    fence

    view viewnum

    selection

    discard=true|false

    This will unlock the features specified by the defined spatial qualifier

    whether or not to discard changes (default: false)

    GDI POST

    Not valid for WFS data sources

    all

    fence

    view viewnum

    selection

    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

    Not valid for WFS data sources

    all

    fence

    view viewnum

    selection

    refresh=true|false

    retain=true|false

    This will discard all changes made to any spatial features since the last lock or post process.

    whether or not to refresh features (default: false)

    whether or not to retain locks (default: false)

    GDI ERASE

    -

    all

    fence

    view viewnum

    selection

    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.

    • Spatial Databases
    • Interoperability
    • Share
    • History
    • More
    • Cancel
    • Inga Morozoff Created by Bentley Colleague Inga Morozoff
    • When: Wed, Jan 2 2019 2:38 PM
    • Inga Morozoff Last revision by Bentley Colleague Inga Morozoff
    • When: Mon, Mar 9 2020 2:48 PM
    • Revisions: 5
    • Comments: 0
    Recommended
    Related
    Communities
    • Home
    • Getting Started
    • Community Central
    • Products
    • Support
    • Secure File Upload
    • Feedback
    Support and Services
    • Home
    • Product Support
    • Downloads
    • Subscription Services Portal
    Training and Learning
    • Home
    • About Bentley Institute
    • My Learning History
    • Reference Books
    Social Media
    •    LinkedIn
    •    Facebook
    •    Twitter
    •    YouTube
    •    RSS Feed
    •    Email

    © 2023 Bentley Systems, Incorporated  |  Contact Us  |  Privacy |  Terms of Use  |  Cookies