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
Hi Chris,
thanks a lot for your detail explanation! It's exactly what I missed in BM documentation :-)
Have a nice weekend,
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
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
Hi Jerry,
thanks for your fast answer. I agree the analogy is good enough to sketch the attribute meaning. Based on it and my current knowledge, are the following statements true?
I always look at it the same way as I do a cell, from the cell library. The individual elaments that make up a cell can be called line, text, shape, etc., whereas the cell has a seperate 'name', thus signifying that the cell is a grouping of different components. Not a direct anology, but the students seem to understand this, since they understand the concept of a cell.