Programmatic Access to Filter Object

M

Matt Rondeau

Is there a way to get access to a Filter object and tranverse its criteria
programmatically (using VBA/.NET)? This means for a given filter, I can
"read" all the properties that were set using the FilterEdit() method.

Is there a way to enumerate over the contents of a Filter definition?
 
J

JackD

I'm afraid that filters fall into the "write-only" category that is so
popular within project.
The only way to know is to either copy your own filter over or build one on
the fly with VBA.
 
M

Matt Rondeau

Thanks--thought there may be a way to do this using FilterObj.GetEnumerator()
method, and then some how use the System.Collections.IEnumerator object it
returned to get the criteria (thought it may be stored in a hashtable or
something).

It's be nice if this feature could be implemented by future versions of the
MSProject object model. I build solutions that use anywhere from 30-50
filters. End users require pluggable custom settings--therefore, filter
definitions are subject to change; As you know, the FilterEdit() method is
ugly and coding these filters takes hundreds of lines of code to build
(recorded or not), updating these filters is nightmare. It'd be nice to have
an easier way of building and maintaing nontrical custom filters.
 

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