Microstation MDL - access raster georeferencing unit defaults

Hi, through MDL (or can accept an answer in any development interface, just to get started) I'm trying to access the 'Default Unit Settings' parameters, specifically the values contained in the "Sister File 1 Unit" and "Raster File 1 Unit" inputs, as well as the actual unit definitions (meters, feet, etc). Have looked through the API documentation and can't quite find this. Does anyone know where to access these values (see picture below for clarity)?

  • Hi Wes,

    Unknown said:
    through MDL (or can accept an answer in any development interface, just to get started)

    such question is a bit weird and unclear, because rarely development tool can be interchanged, swapped or mixed: E.g. when for any reason old pseudocode has be used, the answer based on C++ MicroStationAPI will be not useful. Also to use MDL does not help too much also, because its meaning has changed from "pseudocode application" in older MicroStations to "any tool and API that can be used to develop custom application" in CONNECT Edition.

    Because of that, can you please to specify what MicroStation version do you use and whether by "MDL" you mean e.g. C native code or C++ native code or something else?

    Unknown said:
    I'm trying to access the 'Default Unit Settings' parameters

    Often there is no API to work with settings in User Preferences, because they are used for users' actions. When the same is done by a custom code, the settings are typically set by the code as a part of the whole operation.

    Can you provide more details why do you need to access these settings?

    Unknown said:
    Does anyone know where to access these values

    Usually the recommended first step is to use VBA recorder to check whether the values are accessible as CExpressions.

    With regards,

      Jan

  • Thanks for your concern Jan. What I didn't want to have happen was someone not answer because they 'know how to do it in VBA' or something, but not in MDL. My target environment is Connect, preferably the MDL api, but if someone knows how to do it in V8i I could probably figure out where it moved.

    The macro recorder sends keyins loading the userpref dialog but that's it...this was a good idea though.

    What I'm trying to do is add to a panel showing certain diagnostics pertaining to the current design file and working environment, and the current raster georeference unit defaults is one of the properties I was hoping to show.

  • Unknown said:
    My target environment is Connect, preferably the MDL api

    For MicroStation CONNECT, write C++ using the MicroStationAPI.  MDL no longer exists as a separate API.  Some MDL functions are implemented in the MicroStationAPI for legacy purposes, but in many cases have been superseded by classes having more functionality.

    I see, for example, that the raster file create functions provide a RasterFileCreateOptions struct.  One of its members is

    // Get used to C++ namespaces
    DgnPlatform::Raster::RasterSisterFileType  GetSisterFileType () const 

    Perhaps that will help?

     
    Regards, Jon Summers
    LA Solutions

  • I was hoping to access the actual property value but this could work.