Author Topic: Face-Face, Corner-Corner Alignment (Abut Shapes)  (Read 624 times)

0 Members and 1 Guest are viewing this topic.

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3645
  • Ideas Visio-lized into solutions
Face-Face, Corner-Corner Alignment (Abut Shapes)
« on: August 16, 2019, 11:13:11 AM »
This is an updated version of old post.

This now accommodates offsets from center-middle of the LocPin's.  Because of this, there are certain cases when either/both Flip Horizontal, Flip Vertical will cause formula errors and invalid results.
« Last Edit: August 21, 2019, 11:33:46 AM by Visio Guy »
Visio 2019 Pro

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3645
  • Ideas Visio-lized into solutions
« Last Edit: August 21, 2019, 11:33:54 AM by Visio Guy »
Visio 2019 Pro

Visio Guy

  • Administrator
  • Hero Member
  • *****
  • Posts: 1669
  • Smart Graphics for Visual People...n' Stuff
    • Visio Guy
Re: Face-Face, Corner-Corner Alignment (Abut Shapes)
« Reply #2 on: August 21, 2019, 11:33:20 AM »
I love this thing. I've developed similar add-ins that I've called "Abut" because this shoves shapes together. This, by the way, is really, really, really, really useful!

Anyway, I've just modified wapperdude's offering in the following way:

  • Moved code into a macro-enabled stencil, entitled VBA Alignment Tools.vssm
  • Launch the form as "modeless", so it stays open all the time. You may have to click twice when going from the form back into a Visio drawing, but you get used to that quickly.
  • Created a shape that you can double-click to launch the form. Just drag it onto a page and double-click it, rather than figure out how to launch macros from the ribbon (View > Macros > Macros...)
  • The stencil can be placed in the folder: %userprofile%\Documents\My Shapes
  • You can also access the My Shapes folder via Shapes > More Shapes > My Shapes > Organize My Shapes
  • As a stencil, the code can now be accessed by any document. Just Go to Shapes > More Shapes > My Shapes and pick the stencil.

By putting code in a stencil, you increase flexibility by allowing easy access to the code from any drawing, and you decrease "code proliferation", where many documents contain variants of the code. Also, documents no longer contain VBA code, so sending them to people who don't want to run code or aren't allowed to run code can still use the documents. The code-stencil functions as an add-in that users can choose to load or not load.

Cheers,

Chris
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

Visio Guy

  • Administrator
  • Hero Member
  • *****
  • Posts: 1669
  • Smart Graphics for Visual People...n' Stuff
    • Visio Guy
Re: Face-Face, Corner-Corner Alignment (Abut Shapes)
« Reply #3 on: August 21, 2019, 11:38:26 AM »
Here is a screenshot that shows how to access a stencil saved in My Shapes. It also shows the "macro-launching button shape" that you can drag onto any drawing page, then double-click to launch the Adjacent Align form.
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3645
  • Ideas Visio-lized into solutions
Re: Face-Face, Corner-Corner Alignment (Abut Shapes)
« Reply #4 on: August 21, 2019, 01:05:01 PM »
THANK YOU!!!

I was drawing a blank on how to make this easily accessible.  For some reason, adding code to a stencil is like a blind spot for me.  The stencil is super. 
Visio 2019 Pro