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

Get a Saved Filter for reading a structure

SOLVED
Regular Member

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

Re: Get a Saved Filter for reading a structure

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

Re: Get a Saved Filter for reading a structure

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

Re: Get a Saved Filter for reading a structure

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

Re: Get a Saved Filter for reading a structure

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.

Highlighted

Re: Get a Saved Filter for reading a structure

How to get Filtered Part Structure through Obtained Navigation Criteria

Re: Get a Saved Filter for reading a structure

Have a look to the classes WTPartService or PartCollector.

Re: Get a Saved Filter for reading a structure

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.

Announcements
LiveWorx Call For Papers Happening Now!