Author Topic: Coding issue?  (Read 705 times)

0 Members and 1 Guest are viewing this topic.

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3826
  • Ideas Visio-lized into solutions
Coding issue?
« on: September 11, 2019, 05:43:17 PM »
Simple macro.  Select main shape.  Macro converts main to a group.  Sets visibility. Finds shape on top using spatial neighbors.  Adds new shape to group.  Then edits new shape to lock its position and size within the group.  Position offset is hard coded.  All works well if I just run the macro.  But, if I step thru it using F8, then after the add to group step, the shape alignment window launches.  Say what???

So, does this happen for anyone else?  Only happens when using F8.
Visio 2019 Pro

Croc

  • Sr. Member
  • ****
  • Posts: 251
    • Visioport
Re: Coding issue?
« Reply #1 on: September 12, 2019, 03:29:42 AM »
This is because in step-by-step mode after the AddToGroup operation the focus is transferred to the Drawing Window. F8 is executed for the selected group in this window.
To check, manually make any group and execute F8.

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3826
  • Ideas Visio-lized into solutions
Re: Coding issue?
« Reply #2 on: September 12, 2019, 10:01:57 AM »
Thanks Croc.  Didn't suspect that.  Nice to know it's not me.

Well, that's inconvenient.  At least, it seems, before execution of next step, the group can be manually deselected.

Does seem odd though.  It appears that it's either the addtogroup or creategroup methods that create this problem.  Selecting an existing group is fine.  So, I would consider this a BUG.
Visio 2019 Pro