ActiveSettings.CurrentGraphicGroup not adding new text elements to graphic group


I am updating a VBA that runs fine in v8i to run in Connect.

The only part not working is adding text elements added by the vba to a graphic group.  It does add new line elements, but text is not added to the GG.

In v8i at the end of the VBA run, all elements are in a GG, but in Connect they are not, only the lines are. If I run it in v8i and then open the file in Connect, the GG is recognized by Connect.

Code is something like this:

ActiveSettings.CurrentGraphicGroup = Application.UpdateGraphicGroupNumber
..Add line and text elements by sending keyins using CadInputQueue
ActiveSettings.CurrentGraphicGroup = 0


Parents Reply
  • Hi Geoff,

    the keyin "PLACE DIALOGTEXT ICON" is waiting for input while the VBA code already has executed.
    Also DIALOGTEXT allows to place several text elements,  which means this method to place text cannot be used in combination with the workaround.
    There are other methods which could be used instead, e.g.:
    - keyin "place text"
    - VBA method CreateTextElement1
    - VBA IPrimitiveCommandEvents
    It depends on your needs which method you prefer.

    Best regards,

No Data