AP_Dialog_WordCount uses some code in FV_View to determine that sort of information. I know you'll probably want to avoid touching view-like things, but ultimately it digs through the PT to count how many PTX_Blocks, etc... that there are. It would be a useful reference point.
Also, the PD_Document class should be of some great use to you here, since it obviously knows when appendSpan and appendStrux are called. You might do best to make a few minor mods to the Doc class that keeps a bit of meta-accounting information handy. Good luck, Dom --- Seth Delackner <[EMAIL PROTECTED]> wrote: > I know I could find this with a little digging, but > in a pd_Document, the > pt_PieceTable represents the parts of the document. > What do I call to > determine the number of say, paragraphs or for that > matter, "often repeated > regions of a document". Is that PTStruxType? > > What I'm trying to do is generate some (modestly > vaguely accurate) progress > indication output during file import / export since > for whatever reason some > documents take so long to load. Counting the number > of paragraph markers > (ascii 13 (^M)) in an MsWord file seems pretty good. __________________________________________________ Do you Yahoo!? Yahoo! Tax Center - File online, calculators, forms, and more http://tax.yahoo.com