Problem Using DEPENDSON() with the Container Shape Sheet Relationship Cell

Started by BRCDbreams, January 24, 2013, 11:11:05 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

BRCDbreams

I want to trigger a procedure written in VBA when a shape is added or removed from a container.

I see that the Relationship cell in the Shape Layout section of the container shape sheet changes anytime a shape is added or removed to/from the container.  So, I created a User cell as below.

User.ShapeAddRemove    =DEPENDSON(Relationships)+CALLTHIS("TotalPortsInStack","ICXSwitchStacks")

When I add the first shape to the container, the VBA procedure "TotalPortsInStack" in the stencil "ICXSwitchStack" is called and runs.  But after that, this procedure never runs again for that container when I add or remove shapes in the container.

I thought the DEPENDSON() function would cause the CALLTHIS() to execute anytime a shape is added or removed in the container since the Relationship cell gets updated anytime a shape is added or removed from the container. But, that's not what happens.

What am I missing?

JuneTheSecond

I have no solution.
The behavior of this Relationship cell is mysterious.
I had thought Dependson function trigers events only when the value of the cell that Dependson function specifies changed.
But now I met the fact that it is not true. Because the value of Relationship cell is always False, it never changes.
Nevertheless, DEPENDSON(Relationships) react only at the first time when a shape is added to the Container.
It acts really only once while the values of the cell never changes.
Best Regards,

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