Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
  • Welcome
  • Products
  • Support
  • About
  • More
  • Cancel
iTwin Services
  • Product Communities
  • Digital Twin Cloud Services
  • iTwin Services
  • Cancel
iTwin Services
Synchronization Wiki Publishing DWG models
    • Sign In
    • Synchronizations Wiki
    • -iTwin Spatial Alignment
      • iTwin Extents
      • +Publishing Revit model files
      • Publishing DWG models
      • Publishing IFC model files
      • Publishing Reality Data
      • Spatially aligning GIS data
    • +Synchronization Knowledge Base
    • +Supported File Formats
    • +Ways to sync your data to an iTwin
    • +Ways to export your data from an iTwin
    • Knowledge base
    • Calculated Property missing in Design Review

    You are currently reviewing an older revision of this page.

    • History View current version

    Publishing DGW models

    Correctly geolocated iModels can provide additional benefits to a model coordination workflow. Not only can the background map provide more context to the model, measuring coordinates and sharing this information can be valuable for model review tasks.
    To take advantage of an iModel’s capability to work in a multidisciplinary environment and with various other source files and formats, it is important to correctly align DWG models.

    A DWG file may be connected to an iModel using one of the following iTwin Connectors: AutoCAD, AutoPlant, and Civil 3D. 

    Please see the following sections for advice which best describes your geolocation issues. If in doubt, please also consider communicating with the author of the model files. It is also advised to adhere to Autodesk’s recommended best practices.

    Table of Contents

    • Types of Coordinate Systems in DWG
    • Working with GCS in DGW models
      • Assign a GCS in AutoCAD Civil 3D or AutoCAD MAP 3D
      • Replace existing Geographical Coordinate System
      • Set correct model units
    • Geolocation methods
      • Using a MicroStation geolocation file to synchronize DWG
      • Using a DWG as a geolocation file

    Ballot box Share your feedback and vote on which data types or formats we should document next here.

    Types of Coordinate Systems in DWG

    There are two different geolocation types in AutoCAD-based products;

    • Use of local coordinate system
    • Use of a defined Geographical Coordinate System (GCS)

    To properly position DWG files, they need to have the GCS defined. Currently, a GCS created using local coordinate system is not supported, and there could be cases where the results might be spatially misaligned after successfully connecting such a DWG file to an iModel. 

    Differences in design applications:

    • In AutoCAD, a GCS can only be created using a local coordinate system. In this workflow, a GCS is placed at a given point in the model coordinate system. This process may be compared to attaching a raster file as a background image.
    • In AutoCAD MAP 3D or AutoCAD Civil 3D, a GCS can be created using a geographical coordinate system. In this workflow, a GCS is assigned to a model, effectively making the model in the same geographical coordinate system.

    Thus, Civil 3D and MAP 3D, but not AutoCAD, are recommended for GCS creation in a DWG file, which will be used to geolocate an iModel.

    Working with GCS in DGW models

    Assign a GCS in AutoCAD Civil 3D or AutoCAD MAP 3D

    Civil 3D or MAP 3D could be used to create a GCS in a DWG file. They both have a command MAPCSASSIGN used to assign required GCS to the DWG file. Keep in mind that the library's appearance or content may change from one product version to another, but the command shall hopefully remain the same.

    Image 1 - Example of GCS library invoked by MAPCSASSIGN

     

    There is a different way of setting a GCS in Civil 3D. If you are a C3D user and prefer using its TOOLSPACE, you have this alternative:

    1. Select the "Settings" tab in TOOLSPACE
    2. Right mouse click on the file name
    3. Select "Edit Drawing Settings"
    4. Set options as appropriate in Drawing Settings

    Image 2 - Example of Drawing Settings dialog in Civil 3D

    Replace existing Geographical Coordinate System

    A GCS created in plain AutoCAD does not work for iTwin as the model may not be in the geographical coordinate system.  In this, the GCS may be replaced in Civil 3D:

    1. Open the source DWG file in Civil 3D
    2. Invoke command GEOREMOVE
    3. Accept the prompt to delete existing GCS
    4. Create a new GCS by following the steps outlined in the above section Assign a GCS.
    5. Invoke command GEOMAP to check if the new GCS is against the model.
    6. If the model is not aligned with the new GCS, re-align it.
    7. Save the file.

    Set correct model units

    DWG is a unitless file format. However, it has a system variable called LUNITS, Design Center Units:

    • When LUNITS is set to real-world units, the units will be used for iTwin.
    • When LUNITS is set to Unitless, a DWG connector will make the best effort to infer possible units used in a DWG file, but it is not reliable.

    You should always try setting the correct units using LUNITS that are also consistent with the desired GCS. 

    Setting correct units in a source DWG file will ensure you get the correct units in iTwin. 

    Geolocation methods

    The following sections describe how to best configure DWG models to achieve perfect geospatial alignment.

    Using a MicroStation geolocation file to synchronize DWG

    Connecting model files

    Regardless of the synchronization method chosen for connecting model files, always ensure that:

    • The DGN file is connected first and is selected as the file defining the geocoordinate system – ideally within its own connection.
    • The geolocation file is not modified, and is used for each new iModel.
    • The geolocation file only needs to be synchronized once.
    • The GCS cannot be changed once connected. Updating the GCS will require a new iModel to be created.

    In this setup, it may be a good idea to check if a DWG file matches the DGN file before adding the DWG file to the iModel connection. 

    A recommended check may be done in MicroStation:

    1. Open the first DGN file as a master file in MicroStation.
    2. Attach the to-be-added DWG file as a reference file.
      • In Reference Manager, ensure that the Coincident view, i.e., "Align With the Master File," is selected for this attachment.
    3. If the DWG file looks correct against the DGN file, the DWG file may be added to the iModel connection as an independent model connected by a DWG connector.
    4. If the DWG file is not aligned correctly in MicroStation, there are two options:
      • Keep the DWG file as a reference attachment in the DGN file, and align the attachment to the master file, then let a DGN based connector publish the DGN file along with the DWG reference file to the iModel, or
      • Open the DWG file in the product in which the file was created, move the model to the correct location, repeat the above steps to check the DWG file again, then publish the file with a DWG connector.

    Using a DWG as a geolocation file

    When a DWG file has a valid GCS that uses a geographical coordinate system, as opposed to a local coordinate system, it may be used for the geolocation of an iModel. Other files added to the iModel connection will use the first DWG file's GCS. If an added file is a DGN or another DWG file, checking the model alignment before starting a new connection is a good idea.

    Validating model alignment

    If a to-be-added file is DWG, it can be checked in either Civil 3D or MAP 3D:

    1. Open the first DWG file in Civil 3D or MAP 3D
    2. Attach the to-be-added DWG file as an xReference file at the world origin 0,0,0.
    3. If the two files are aligned correctly, they can be independently connected to the iModel, where the two models shall also be aligned correctly.
    4. If they are not aligned correctly in Civil 3D or MAP 3D, there are two options:
      • Keep the to-be-added DWG file as an xReference file in the master DWG file, align the xReference attachment to the master file, then let the DWG connector publish the master file along with the attached xReference file, or
      • Open the to-be-added DWG file in the product in which the file was created, move the model to the correct location, repeat the above steps until the two models are aligned, and then add the modified DWG file to the iModel connection such that the file may be published independently.

       

    If a to-be-added file is DGN, the file can be checked in MicroStation:

    1. Open the first DWG file as a master file in MicroStation.
    2. Attach the DGN file using Reference Manager.
      • If the Reference Manager has a Geographic view available, select that view to project the DGN model to the DWG's GCS,
      • Otherwise, select view Coincident, i.e., "Align With the Master File."
    3. If the DGN file looks correct against the first DWG file, a DGN-based connector may be used to connect the DGN file to the iModel
    4. If the two files are not aligned correctly, open the DGN in MicroStation, move the model to the correct location, and repeat the above steps until they are aligned.

    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