Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
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:
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
Solved! Go to Solution.
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,
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.
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.