Automatic Container Margins/Padding.

Started by bwharrington, September 14, 2020, 09:27:59 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

bwharrington

I'm working on piece of code that needs to layout shapes within a container.

I'm finding that when I manually attempt to move shapes around in a container there is forced margin/padding being applied and I can never quite get the shape to sit up against a side of a container. I'm forced to either accept this margin or allow Visio to resize the container. Neither of these outcomes are desired. You will see in my attached screenshots.

My thought on this is that there may be some of this going on in the background that Visio is enforcing while I do this programmatically as well. Having experience with writing MS Project Addins there are a ton of forced calculations that will play with your numbers programmatically. MS Project does allow this to be turned on and off programmatically.

Is there a way to programmatically turn on and off Visio's forced calculations and adjustments?

Thanks,

Paul Herber

Open the container's shapesheet and look at section User-defined Cells then look at cell User.msvSDContainerMargin
The default seems to be =3 mm*DropOnPageScale for metric shapes and =0.125 in*DropOnPageScale for US format so you might want to change this to suit your needs, even set it to 0.
Electronic and Electrical engineering, business and software stencils for Visio -

https://www.paulherber.co.uk/

bwharrington