If you are trying to work with AutoCrap software their proprietary
crippleware .dwf file format will tell you how many pages are in the file if
you can figure out how to work with the crippleware they publish not to
mention trying to find reliable up to date code libraries and documentation.
Note the AutoCrap @sssholes charge over $1200 a year to belong to their
"developer's program" where they hide most of the real documentation while
justifying the sh!!!t they pull by claiming its comparative to Microsoft's
MSDN subscription which is only true at face value because nobody needs all
the other useless sh!!!t they throw in the bag when you just want docs for
one application.
AutoCrap has its own newsgroups and there is at least one group for Revit
where developers use .NET. I would ask around there if you have not already
but be advised, the company and almost all of the people it attracts are
generally pompous self-centered @ssssholes so you will have to walk on egg
shells and beg for help and then it will generally come with some smart
@ssed belittling remark so be prepared.