XFM Data Structure

Hello, I have been working on BentleyMap V8i XFM for sometime now and amazed at nice and simple things it can do. However I would like to know if there is an open document from Bentley on the structure of XFM data stored inside a dgn file similar to MSLINK or User data linkages and how to interpret these linkages outside of Bentley environment. Tx SRG
Parents
  • XML Fragments

    SRG:
    I have been working on BentleyMap V8i XFM for sometime now and amazed at nice and simple things it can do. However I would like to know if there is an open document from Bentley on the structure of XFM data stored inside a dgn file similar to MSLINK or User data linkages and how to interpret these linkages outside of Bentley environment.

    XFM is based on XML Fragments, which are a part of the MicroStation platform on which Bentley Map is built.

    There is an extensive XML Fragments API for the MicroStation Development Library (MDL). You could use this MDL API to extract XFM data. Because the data are structured, it would be straightforward to assemble the fragments into a form (presumably a document object model) that other applications could use. There is not, currently, a VBA API for XML Fragments.

    Regards, Jon Summers
    LA Solutions

     
    Regards, Jon Summers
    LA Solutions

  • Also take a look at this post: http://communities.bentley.com/Products/Geospatial/Desktop/f/5924/t/13242.aspx

    You can read the dgn property data as Jon suggests but you will not know the feature and sub-feature relationships as defined in the XFM UUID linkage on the element. Depending on your data, these relationships may not be important to you. Generally property data is stored with the root feature. But in the case of an Away type annotation, the BubbleNum property is stored with the annotation sub-feature. Perhaps you could ignore these sub-features by checking if the feature name contains "Anno" or "Text" or whatever you have in your environment.

    Or if you want to read the UUID linkage, its format is specified by XfmUuidLinkage in xfmLinkage.h and can be read with link ID 22564. Compare XfmUuidLinkInfo:scanFlag:  (scanFlag & 0x00000001).  A null value for XfmUuidLinkInfo:parentUniqueID denotes a root feature element.

    With plain MicroStation, you can extract the XFM feature name from the element with the following MicroStation function:

    mdlLinkage_extractNamedStringLinkageByIndex (pName, MAX_FEATURE_NAME_LENGTH, pElement, STRING_LINKAGE_KEY_GeoFeature, 0);// STRING_LINKAGE_KEY_GeoFeature is defined in msdefs.h// MAX_FEATURE_NAME_LENGTH is defined in xfmapidef.h

     

    HTH,

    Chris


    This is a test

Reply
  • Also take a look at this post: http://communities.bentley.com/Products/Geospatial/Desktop/f/5924/t/13242.aspx

    You can read the dgn property data as Jon suggests but you will not know the feature and sub-feature relationships as defined in the XFM UUID linkage on the element. Depending on your data, these relationships may not be important to you. Generally property data is stored with the root feature. But in the case of an Away type annotation, the BubbleNum property is stored with the annotation sub-feature. Perhaps you could ignore these sub-features by checking if the feature name contains "Anno" or "Text" or whatever you have in your environment.

    Or if you want to read the UUID linkage, its format is specified by XfmUuidLinkage in xfmLinkage.h and can be read with link ID 22564. Compare XfmUuidLinkInfo:scanFlag:  (scanFlag & 0x00000001).  A null value for XfmUuidLinkInfo:parentUniqueID denotes a root feature element.

    With plain MicroStation, you can extract the XFM feature name from the element with the following MicroStation function:

    mdlLinkage_extractNamedStringLinkageByIndex (pName, MAX_FEATURE_NAME_LENGTH, pElement, STRING_LINKAGE_KEY_GeoFeature, 0);// STRING_LINKAGE_KEY_GeoFeature is defined in msdefs.h// MAX_FEATURE_NAME_LENGTH is defined in xfmapidef.h

     

    HTH,

    Chris


    This is a test

Children
No Data