get_SectionExists Does Not Return Correctly

A

AxlsPixel

Hi,

I am using Visio 2003 SDK and am looking at the sample
"FlowChartSample in C#". The template for this sample is "Flowchart
(CSharp.NET).vst". If I view the ShapeSheet for this document I can
see a user defined section with one cell viz. "User.SchemaName" with a
value "Black & White". However, if within the Connect method of the
add-in I invoke get_SectionExists as shown below:

private bool IsManagedTutorialTemplate(Document document)
{

if (document.DocumentSheet.get_SectionExists(
(short)VisSectionIndices.visSectionUser,0) != 0)
{
if (document.DocumentSheet.get_CellExistsU(Shared.TEMPLATE_USER_CELL,
0) != 0)
{
return true;
}
}
return false;
}

get_SectionExists always returns 0. What am I missing or doing wrong?

Rudolph
 

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