Quantcast
Channel: MicroStation Programming Forum - Recent Threads
Viewing all articles
Browse latest Browse all 7260

[CONNECT C++] DgnElementSetTool fence & selection processing

$
0
0

I need guidance on writing a tool that performs fence processing using DgnElementSetTool.  Unfortunately there is no example delivered with the SDK that illustrates fence processing using DgnElementSetTool (there are some examples that perform fence processing the MDL way).

I'm attempting to write a tool that inherits from DgnElementSetTool .  Its purpose is to add instance data from my Item Types schema to an existing element.  After adding instance data, it creates a label that shows those data...

The tool works fine when picking (i.e. user chooses a single element).  My problem lies with multiple element processing when the element source is a fence or selection set.

When a fence or select set is active, the DgnElementSetTool does its job and prompts for a data point to process the elements.  It arrives at _OnElementModify() and modifies each element (adds an Item instance and creates the label).  However, it doesn't stop!  I'm expecting _OnModifyComplete() to be called, but I don't understand the precursors to that happening.  A consequence of the interminable processing is that the tool adds dozens of labels to each element as I move the mouse, until I explicitly stop the tool with a Reset.

Specifically:

  1. What sequence of events should we expect to see when _DgnElementSetTool processes multiple elements?
  2. Under what circumstances is _OnModifyComplete() called?
  3. What is the correct way to terminate fence processing (i.e. after each member of the ElementAgenda has been processed once)?
  4. What is the correct way to restart the tool?


Viewing all articles
Browse latest Browse all 7260

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>