Visio Guy

Visio Guy Website & General Stuff => User-submitted Stuff => Topic started by: wapperdude on August 16, 2019, 11:13:11 AM

Title: Face-Face, Corner-Corner Alignment (Abut Shapes)
Post by: wapperdude 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.
Title: Re: Face-Face, Corner-Corner Alignment (Abut Shapes)
Post by: wapperdude on August 16, 2019, 11:16:41 AM
The old post is:  http://visguy.com/vgforum/index.php?topic=6730.msg28018#msg28018 (http://visguy.com/vgforum/index.php?topic=6730.msg28018#msg28018)
Title: Re: Face-Face, Corner-Corner Alignment (Abut Shapes)
Post by: Visio Guy 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:


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
Title: Re: Face-Face, Corner-Corner Alignment (Abut Shapes)
Post by: Visio Guy 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.
Title: Re: Face-Face, Corner-Corner Alignment (Abut Shapes)
Post by: wapperdude 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. 
Title: Re: Face-Face, Corner-Corner Alignment (Abut Shapes)
Post by: MatLcq on February 13, 2020, 03:40:49 AM
This is amazing! I was looking for a way to share tools using VBA without having code in the document itself and this is exactly it  :D
Any trick needed to make it work or is it as straightforward as you describe it?
How did you make the form "modeless"? When looking at the form properties, showModal = True, but it should be false right?
Thank you a lot for sharing this.
BTW, thank wapperdude for this excellent tool!! I'm using it all the time.
Title: Re: Face-Face, Corner-Corner Alignment (Abut Shapes)
Post by: MatLcq on February 17, 2020, 09:46:51 AM
[...] 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 [...]

In the master shape of your stencil, there's a User.PageRef with formula set to =ThePage!Actions.UpdateConnectionCount+ThePage!Actions.UpdateConnectionCount
That function doesn't exists in the MCallThis VBA module. Is this just something left from an other use or is is important?
Title: Re: Face-Face, Corner-Corner Alignment (Abut Shapes)
Post by: wapperdude on February 17, 2020, 01:56:25 PM
All things associated with the stencil were provided by Visio Guy.  I had verified that things worked fine, but have not reviewed all of the new coding.  It sounds like the User.PageRef might have been o holdover, but, as I had no error mssg, no reason to delve into the code/shapesheet. 

Title: Re: Face-Face, Corner-Corner Alignment (Abut Shapes)
Post by: dcasciato on October 16, 2020, 10:43:57 AM
Being relative new to Visio I am not sure what this is code does.

May I suggest someone create a YouTube demonstration of how to add to Visio and the use of the ?Macro?

Thanks Dan