Trouble with Dynamic Feature Scoring (DFS)

Hello all,

I try to use DFS in a really simple structured project with only a few features. Here's an example: a linear element (line, line string) on Level 2 which is blue (color 3) should be designated as "my.feature". I tried the following syntax in my dfs.xml file:

<FeatureScoringRules minScore="3">

<Feature useCriteria="" name="my.feature">
<Rule type="CExpr" score="1">XFMCompareElementLevelName("Level 2")</Rule>
<Rule type="CExpr" score="1">XFMCompareElementColor(3)</Rule>
<Rule type="Element" score="1" ElementType="3-4" checkZeroLengthLineElementType="false"/>
</Feature>

</FeatureScoringRules>

MS_GEOXFM_NO_LEVELFEATURES and MS_GEOXFM_NO_CELLNAMEFEATURES are turned off, because I'd like to control what happens in my dfs file. I don't like any features to be assigned by just by level or just by cellname.

In addition, I renamed the file FEATURESCORING.XML which is automatically created by the GSA system during the export process. My goal is to make it inactive this way, so I renamed it to .xml_. What I don't really understand is: if there are two dfs control files and both are recognized by the system, there is a chance that they have contradictory contents. Which one is evaluated by Bentley Map in that case?


Now, when I open a dgn file using my above dfs I expected the existing elements that reach the minScore of 3 as well as new elements to turn into native "my.feature". Instead, I find two things: first, none of my existing blue line strings on Level 2 turn into features. Second, if I digitize new lines on Level 2 in blue, they become "Inferred feature: my.feature". But, the system doesn't care what element type they are!! That is, a blue circle or a blue text on Level 2 also becomes "my.feature", which makes no sense. The syntax I used is exactly like it is explained in the "Bentley Map-DFS Notes.docx" document.

It seems to me that the dfs is working in principle, being the problem that the rule type "Element" is always considered true. If I set the minScore to 4, then no new elements become features any more.

Any ideas? Thanks in advance, Uwe

Parents Reply Children
  • Jerry and Chris,

    thank you very much for your answers. Jerry, let me please tell something about the workflow in which I try to use DFS. That might help to see what I'm trying to achive. We don't place native features the usual way via methods from the command manager. When our dgn files come from basic data collection workstations, they have no feature tags and no level names. There's just linestrings, texts and some cells on levels 1, 2 and 3. This situation can't be changed due to the software equipment on these PCs.

    Now, we have to turn those "naked" elements into correct features to perform analysis, overlay and conversion into other formats. In GeoGraphics, this worked perfect using the "Feature Attach Best" functionality. My intention was to imitate the FAttachBest procedure using DFS with scoring rules. Is this possible? If not, what is the best way to native feature-tag existing elements in a file without level name definitions?

    Another important question is: is there a way in Bentley Map to get new elements feature-tagged when those elements are created by the system using a command like "fence create areas"? In GeoGraphics, I had to set an "Active Feature" prior to the element generation. How does this work in Bentley Map? I didn't find something like "Active Feature ="

    Chris, please see the example dgn file in the attachment. The blue linear elements on level 2 are the ones I tried to feature-tag as an example. The content of the according XML can be found in my first post.


    Thanks a lot in advance, Uwe

    simple_file.dgn

    Versions in use:     MicroStation 08.11.09.357         Bentley Map 08.11.09.107

  • Uwe:
    In response to your references to Geographics and the use of Feature Attach Best, and Active Feature tools. I believe using the Promote tool in Map can be used in place of the Feature Attach Best. This tool allows you to create generic elements and then later 'featureize' them. This tool works with selection sets, individual elements, and fences. You need to add this functionality to the feature definition in the GSA for the features you wish to 'promote'. Unlike DFS, this will create native features out of the geometry.

    As for the fence create areas, once again there is no automatic way to do this. I again refer back to the promote tool to perform this functionality after the areas ( polygons) are created.

    HTH
    Jerry

     

  • Jerry,

    thank you very much for your answer. I tried the promote tool in the Geoexample workspace with some existing features that have this method implemented. It works. But I have to featurize hundreds of elements in many files after they are generated or reviewed, same procedure every time, so it has to be automated in some way.

    I tried to record a basic macro while promoting, but nothing happened. The command was not recorded. Does this mean there is no basic command for promoting?

    Then, I tried the keyin browser, giving me a very strange outcoming: it offered the Key-in FEATURE ATTACH BEST! What does this mean? Is there a way to use a key-in for promoting? Command table outdated?

    And again: what is the intention for DFS? If it is not to featurize existing elements like F Attach Best? I just don’t understand, sorry.

    Regards, Uwe

    Versions in use:     MicroStation 08.11.09.357         Bentley Map 08.11.09.107