Capture Text from a Point Cell into Form Text Boxes and then Replace the Existing Text in the Cell with that from the Form

Hi All,

Looking for help again. I'm looking to capture text located in an already placed Point Cell and place that text into specific textboxes held in a form. Once a user has then updated those textboxes then be able to replace the existing text in the point cell that was selected from text populated in the form.

Ay help appreciated.

Best regards,

Carl

  • Hi Carl,

    there are more separate topics in your post, but in general the workflow could be:

    1. Implements ILocateCommandEvents object, it allows to create tool which behaves similarly to MicroStation modification tools.
    2. When a cell is identified by locate command, you have to process the cell and iterate trough cell's elements (you will receive enumerator from GetSubElements method) to find the text.
    3. After the text is found, show VBA form.
    4. Next data point (you are still inside location function) will check if the text in the form was changed and if yes, it has to change it and to rewrite the cell.

    Note: I am not sure if the locate function returns the cell as complex element or if it is able to return the text inside the cell directly (I guess not).

    With regards,

      Jan