ungroup on drop

Started by perry59, January 05, 2020, 09:11:03 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

perry59

I know there are similar topics, please excuse if asked before.
I have some shapes on a stencil that I want to automatically ungroup when dragged from the stencil.
It appears there is no way to do this?
I know a macro can do this, but I do not want macro's in my templates.
There is a DOCMD that will ungroup, but when editing the shapesheet for a master in a stencil there are no events.
so I take it that all I can do is tell my users that these particular shapes need to be ungrouped when adding them from the stencil?
Thanks
what, me worry?

vojo

if possible, then the docmd would be in the ondrop cell in the group shapesheet

perry59

There is no events section in the stencil in which to add a DOCMD.

Thing is, in the stencil the items making up my object are NOT grouped, they are only grouped when drug off the stencil onto a drawing. That's the behavior  I'd like to change, but is probably not possible. I'll just have to tell my users to ungroup these items after inserting into a drawing.
what, me worry?

vojo

in the "on drop" cell in the shape's shape sheet, put docmd(xxxx)
I don't think there is a docmd to ungroup a group...but check...if so, put it in the "on drop" cell

Assume docmd(1234) means to ungroup, then

eventdrop = docmd(1234)

Obsidian

Not 1234. visCmdObjectUngroup = 1052

DOCMD(1052)
And may be from the darkness something beautiful will rize

Surrogate

#5
Obsidian, you are right! Not 1234, it mean -
visCmdDistributeRight.

https://docs.microsoft.com/ru-ru/office/vba/visio/Concepts/docmd-docmd-commands


vojo

1234 was just an example.....I guess I should have said  eventondrop = docmd(<xxxx>)  since there a lot of codes