Saving data graphic and graphic item in a stencil

G

geejay

Hi

I would like to know whether I am going about this the right way.

I would like to apply a data graphic (that I setup with the "new data
graphic..." link in the Data Graphics task pane) to some objects in a drawing.

I create the drawing programmaticaly (C#) and use a template that contains
all my shapes to construct the drawing.

After trying to create a data graphic and a graphic item, I rename the data
graphic in the Data Graphics task pane and then search for it in the stencil
masters of my stencil when I go to programatically layout the drawing. The
data graphic I get is of type visTypeDataGraphic, but it doesn't contain any
graphic items! And the documentation (SDK and samples) state that graphic
items can't be created outside of the UI....

Is there a way to achieve creating a text callout data graphic on shapes in
a drawing? And taking the graphic item from a stencil?



Thanks

Greg
 
G

geejay

Ok, so its not the best solution but it's all I could get to work.

I saved a representative object in a template (vst file) with a data field.

I also applied a data graphic to that data field, and created the text
callouts that I wanted.

Then I grabbed the object reference (shape.DataGraphic) from the shape when
I first load the template. I then apply that reference to the
shape.DataGraphic member of any shape I want to have that data graphic.

Surely there's a way to save the data graphic in a template or stencil
without having to copy the data graphic master from an existing shape?
 

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