cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

We are happy to announce the new Windchill Customization board! Learn more.

Get a Saved Filter for reading a structure

lmouchard
10-Marble

Get a Saved Filter for reading a structure

In the Windchill GUI, on the structure tab (info page of a WTPart), I can define and reuse Filter for the configuration. See the following immage:

screenshot_2016-12-02_000751.jpg

I would like to export the part structure using one of the saved filter I created in Windchill.  My first approach is to try to find the instance of ConfigSpec, but I could not really find the way to go.

Is the following a good starting point or should I look for "Filter" instead of ConfigSpec?:

ConfigService.getConfigSpecFor(NavCriteriaContext(....)) 

Thanks,

LM

1 ACCEPTED SOLUTION

Accepted Solutions

There is a direct way of getting the Filter for WTPart structure:

NavigationCriteria navigationCriteria = NavigationCriteriaHelper.service.getNavigationCriteria("MyFilter");

I am not quite sure how to get the Filter for structure of WTDocument, it could be thsnls one of the other methods of the service.

Loïc

View solution in original post

6 REPLIES 6

Hi all,

after some deeper researches, I think we should be able to get the configuration from the NavigationCriteria. I could create a Navigation Criteria Context, but I suppose I need the application name use by Windchill to store the Filters... With the following code, I am able to retrieve the default ConfigSpec for the part in the 'list'

NavCriteriaContext navCriteriaContext = new NavCriteriaContext();

navCriteriaContext.setApplicableType(WTPart.class);

// navCriteriaContext.setApplicationName("???");

navCriteriaContext.setSeeds(list);

WTPartGetConfigSpecForDelegate delegate = new WTPartGetConfigSpecForDelegate();

List configSpecs = delegate.getConfigSpecFor(navCriteriaContext);

Does someone know has a tip what could be used as application name, or eventually whether I am on the right track?

Thanks,

LM

There is a direct way of getting the Filter for WTPart structure:

NavigationCriteria navigationCriteria = NavigationCriteriaHelper.service.getNavigationCriteria("MyFilter");

I am not quite sure how to get the Filter for structure of WTDocument, it could be thsnls one of the other methods of the service.

Loïc

Hi all,

 

                      Please let me know how to derive the part structure based on Saved filter, whether it is feasible, if yes then, please let me know the brief information & Supported API's, would be helpful for us..

 

Thanks,

Srinivasan.

vyewale
4-Participant
(To:lmouchard)

How to get Filtered Part Structure through Obtained Navigation Criteria

Have a look to the classes WTPartService or PartCollector.

Note, this call allows you to get the NavigationCriteria owned by the user of the session. If you have to get the shared filtered, you can do a query.

Top Tags