2007 PivotDiagram -Programmatically 'Apply Shape' feature to a Shape to a Node

U

u828576

How would you programatically "Apply Shape" (image from a stencil) to a node
using User.visddTitle to select the node to add the image to??

eg

[structured english]
For each shape on page
Select case shape User.visddTitle
case 'Printer'
Add PRinter icon from stencil to node
end select
next


I would have copied the code from the macro, but for some reason no code
gets generated..??
 
M

Mark Nelson [MS]

Pivot Diagram is a Visio add-on that does not expose a programming
interface. Your best bet would be to write your own code to iterate through
the shapes on the page and drop a master in the position you determine.

--
Mark Nelson
Office Graphics - Visio
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.
 
U

u828576

Thanks Mark - thats what I've done.

Check for the name of the node , then add the shape from the master

For Each p_objCurrentObject In pag.Shapes
If IsPiviotNode(p_objCurrentObject) Then
strNodeName =
p_objCurrentObject.Cells("Prop._VisDM_Member").ResultStr("")
x = p_objCurrentObject.Cells("PinX").ResultIU - 0.85
y = p_objCurrentObject.Cells("PinY").ResultIU + 0.1
Call ApplyFormating(strNodeName, x, y, p_objCurrentObject)
End If
next


ApplyFormatting
Application.ActiveWindow.Page.Drop
Application.Documents.Item(strNameOfStencil).Masters.ItemU(strImageStencilName),
dblX, dblY



Mark Nelson said:
Pivot Diagram is a Visio add-on that does not expose a programming
interface. Your best bet would be to write your own code to iterate
through the shapes on the page and drop a master in the position you
determine.

--
Mark Nelson
Office Graphics - Visio
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no
rights.

u828576 said:
How would you programatically "Apply Shape" (image from a stencil) to a
node using User.visddTitle to select the node to add the image to??

eg

[structured english]
For each shape on page
Select case shape User.visddTitle
case 'Printer'
Add PRinter icon from stencil to node
end select
next


I would have copied the code from the macro, but for some reason no code
gets generated..??
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top