What is Collection Name attribute used for?

Hi all,

I taught XFM concept/technology and how to create own project recently and I found out I don't know (and so not able to explain well :-) for what can be used the attribute Collection Name. I know what is filled in GSA when new feature / subfeature / collection is created, but there is no much information about it in help file.

Are there any examples or more detail explanation available?

With regards,

  Jan

Parents Reply Children
  • Hi Jan,

    The collection name needs to be set for the root feature definition of a collection feature definition.  With collection definitions following the convention:

    Root feature “Name”: River_Collection

    Root feature “Collection Name”: River

    Collection primary geometry sub-feature “Name”: River

    Collection primary geometry sub-feature “Collection Name”: River_Component

    • This root collection name is used as the key to an index of collection feature definitions by collection name. The index is used by functions like xfmFeatureDef_createUsingFeatureOrCollectionName.

    • Map relies on this convention to infer collection feature definitions from instance data when a schema defined feature definition is not available.

    • Map Interoperability uses the collection name as the class name for ECInstances built from XFM collection feature instances.

    • Typically collection name is blank for non-collection feature/sub-feature definitions and non-collection primary geometry sub-feature definitions in collection definitions

    If a “Display Name” is not set for a feature definition, then the “Collection Name” is used.  At some point after the initial XFM release, we implemented feature display labels.  Since there may be old XFM schemas not setting display label, we used collection name for those cases.

    I see a Geospatial Administrator bug, where GSA incorrectly allows me to clear the collection name for the River_Collection definition in geo_example.  When attempting to place a River instance, the correct symbology is not found and the feature instance is not correctly written to the dgn since the placement operation requires the collection name.

    I suggest using the “Category” to group root feature definitions.

    In the help for function xfmFeatureDef_new, you can see a code example of creating feature definitions for a collection feature class.

    Regards,

    Chris


    This is a test

  • Hi Chris,

    thanks a lot for your detail explanation! It's exactly what I missed in BM documentation :-)

    Have a nice weekend,

     Jan