Author Topic: changing top margin of a shape  (Read 3171 times)

0 Members and 1 Guest are viewing this topic.

charlie123

  • Newbie
  • *
  • Posts: 4
changing top margin of a shape
« on: June 26, 2016, 07:43:06 PM »
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?

JuneTheSecond

  • Hero Member
  • *****
  • Posts: 1027
    • Visio Shapes, Stencils and Sample Drawings
Re: changing top margin of a shape
« Reply #1 on: June 28, 2016, 05: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/
« Last Edit: June 28, 2016, 06:53:58 AM by JuneTheSecond »
Best Regards,

Junichi Yoda
http://june.minibird.jp/

JuneTheSecond

  • Hero Member
  • *****
  • Posts: 1027
    • Visio Shapes, Stencils and Sample Drawings
Re: changing top margin of a shape
« Reply #2 on: June 28, 2016, 06:54:27 PM »
By the way here is another example.
Best Regards,

Junichi Yoda
http://june.minibird.jp/

JuneTheSecond

  • Hero Member
  • *****
  • Posts: 1027
    • Visio Shapes, Stencils and Sample Drawings
Re: changing top margin of a shape
« Reply #3 on: June 30, 2016, 01: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.
Code
MyListShape.ContainerProperties.ListDirection = visListDirTopToBottom
But
Code
MyListShape.Cells("User.msvSDListDirection").formulaU = visListDirTopToBottom
does not work at all.
Best Regards,

Junichi Yoda
http://june.minibird.jp/