Showing results for 
Search instead for 
Did you mean: 

BlockLabelOccurrences headache

Valued Contributor
Valued Contributor

ST4 MP12, VC++2010.



Banging my head against the desk on this one! I'm trying to access BlockLabelOccurrences members so that I can copy some values from one document to another (part of a background update addin I'm writing, to get our drawing frames up to date).


I have this thing basically 95% done, but it's all falling over on these label occurrences. I get a memory access violation whenever I try to access anything in a BlockLabelOccurrences object - I can't even read the Count property without a crash. Solid Edge Spy seems to read the info fine, so I can rule out the drafts themselves.


The access chain is like this:


DraftDocumentPtr -> SectionsPtr -> SectionPtr (BackgroundSection) -> SectionSheetsPtr -> SheetPtr -> BlockOccurrencesPtr -> BlockOccurrencePtr -> BlockLabelOccurrencesPtr -> Count -> Kaboom.


Following the structure in the documentation and also Solid Edge Spy, this should work fine... so hopefully someone can tell me where I'm going wrong! Please?


[Edit] I should add that once assigned, the BlockLabelOccurrencesPtr object is confirmed as not NULL.


Posted by: Paul Dobson
Post date: 7/16/2013 4:46:44 AM