DeleteSection Fails

G

Guest

I am having a problem with the Visio DeleteShape method. I am trying to
clear the custom properties section of a particular shape in the drawing but
I always get an Hresult error value of: -2032464741 (0x86db0c9b)

hr = shape.DeleteSection(visSectionProp);
I am certain that shape is a valid VisioShape object because I can call
other methods on the same object.

I can't find any documentation of what the error value means. I was hoping
that someone could refer me to a location where I can look it up or tell me
what it means.

The odd thing is when I call the same method on the Document sheet object it
works fine.
CVisioShape vShape = CVisio::GetDocumentSheet();
hr = shape.DeleteSection(visSectionProp);

Any help would be appreciated.
Thank you,
Mike Spampinato
 
D

David P (Visio MVP)

Do you check that the section exists first?
Have you tried deleting each row in the section in reverse order?
 
G

Guest

Yes, I have called the SectionExists method and it does say that the section
exists.

At first glance I did not find a way to iterate through all the rows in the
section. From your question I assume there is an API to iterate through the
rows. I will take a closer look. If anyone knows how to do it sample code
would be great.

Thanks,
Mike
 
G

Guest

OK, I just figured out how to iterate through the rows. For each row I am
calling the DeleteRow method. Unfortunately I am getting the same error
number:
-2032464741 (0x86db0c9b) when I call the DeleteRow.

Does anyone know what the error message means or where I can look it up. I
have done multiple searches on the internet with no luck.

Thanks,
Mike
 

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