Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Translate the entire conversation x

APIs Usage Related to Filtering Expressions

铭周_10045792
5-Regular Member

APIs Usage Related to Filtering Expressions

Version: Windchill 11.0

 

Use Case: I hope that in the customized function, after entering advanced expressions, the code can filter out the objects that meet the conditions of this expression, and the attributes for filtering are on a certain IBA attribute of these objects.


Description:

Is there any JavaDoc for Expression in Windchill? Are there any related APIs for filtering and screening? For example, for an existing Expression (AA00 = AA01 / AA00 = AA02), if AA01 is input as True and AA03 is input as False.

5 REPLIES 5

What are you filtering? A WTPart structure? 

铭周_10045792
5-Regular Member
(To:joe_morton)

Not the WTPart structure.Is an IBA property, as shown in the attached picture.

Of course, the contents of the IBA attribute and the filter I want to enter have passed the expression rule check.

In the example shown, the option is AA00, and the choices are AA01, AA09, and so on.

Based on the IBA attribute (AA09+CA21), the WTPart cannot be queried if you enter AA01; If you type AA09, you can filter out the WTPart.

微信截图_20250307092954.jpg

If I understand,

You have an attribute where the value is "AA09+CA21" and you want it to appear in search results when you search for "AA01". Is that right?

 

In case it helps, here's a couple of  references: 

 

铭周_10045792
5-Regular Member
(To:joe_morton)

I want to know which API to use in the code when customizing functions to perform such filtering, rather than using the OOTB Windchill page query function.

 

For example, if I want to check whether the applicability conforms to the advanced expression specification, I can use

 ExpressionHelper.validateExpression(String var0, Map<String, String> var1, OptionSet var2, WTContainerRef var3)

 

What I want is something like a structure filter in an information structure. There are some applicability, such as AA09+CA21, AA01+CA21, AA09+CA22 and so on. When I enter AA01, I can screen out AA01+CA21 and so on. When I type AA09, I can filter out AA09+CA21, AA09+CA22, etc.

Fadel
22-Sapphire II
(To:铭周_10045792)

ExpressionHelper is not meant for IBA , it handles ATO expression and option aliases
Fede
Announcements


Top Tags