How to best set up VBA in stencil to support both inches and millimeters

Started by Visisthebest, July 02, 2020, 08:04:40 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Visisthebest

I've written a small library of functions for a stencil in VBA embedded in the stencil. I must say this is a wonderful way of working with Visio. Started off writing just for a stencil in millimeters, not taking in to account shapes in inches.

Planning a rewrite (now I know how I should've done it the first time  ;D ) and this time I'd like to create two stencils one for millimeters one for inches.

No doubt many have experience with this scenario, what is the best way to write the VBA code to write for both stencils? Using some constants that I consistently use in the code and change depending on the stencil?

Thank you for sharing your experience and advice!



(By the way, when working in millimeters it is both interesting and a bit of a challenge that the Visio internal units are always still in inches but the data in the shapesheet is in millimeters.)
Visio 2021 Professional