Visio Guy

Visio Discussions => Programming & Code => Topic started by: charlie123 on June 27, 2016, 12:43:06 AM

Title: changing top margin of a shape
Post by: charlie123 on June 27, 2016, 12:43:06 AM
I am automating visio diagrams where I place shapes inside other shapes. I am trying to place a shape (shape 2) in another shape (shape 1) so that the shape 2 does not cover the text in shape 1.

I managed to do this by changing the margins of the outer shape through the shapesheet function "msvSDContainerMargin". But this changes all of the margins of the shape.

Is there a way to only change the top margin of a shape?
Title: Re: changing top margin of a shape
Post by: JuneTheSecond on June 28, 2016, 10:04:44 AM
Change User.HTxtMargin in the shapesheet of sub shape of headding.
For the details of a container, list and headdings please refer to next url.
https://blogs.msdn.microsoft.com/visio/2010/01/12/custom-containers-lists-and-callouts-in-visio-2010/
Title: Re: changing top margin of a shape
Post by: JuneTheSecond on June 28, 2016, 11:54:27 PM
By the way here is another example.
Title: Re: changing top margin of a shape
Post by: JuneTheSecond on June 30, 2016, 06:52:43 AM
I am sorry for more by-the-way.
If the User.msvSDListDirection value is changed in the shapesheet, nothing is changed on the page.
But if a member is added to this list, list direction will be changed.
I've made a short Video and uploaded to YouTube.
https://youtu.be/VX8UsEjnxAc
Please enjoy.

In the case of  VBA macro only the ContainerProperties is effective to change the list properties in the macro.
For example.

MyListShape.ContainerProperties.ListDirection = visListDirTopToBottom

But

MyListShape.Cells("User.msvSDListDirection").formulaU = visListDirTopToBottom

does not work at all.