Showing results for 
Search instead for 
Do you mean 
Reply

is it possible to get category of expressions?

I have all the expressions from a part in a array and want to filter the expression using its type e.g. "User Defined". Is there any way to do so? Till NX 8.5 there was nothing like this.

3 REPLIES

Re: is it possible to get category of expressions?

The filter is just a regular expression match on the expression name.

Any expression name not matching the pattern "p\d+" is user defined for instance.

 

You will have to build your own filter using regular expression matching.

Stefan Pendl, Systemmanager CAx, HAIDLMAIR GmbH
Production: NX10.0.3, VERICUT 8.0, FBM, MRL 3.1.4 | TcUA 10.1 MP7 Patch 0 (10.1.7.0) | TcVis 10.1
Development: VB.NET, Tcl/Tk    Testing: NX11.0 EAP, NX12.0 EAP

How to Get the Most from Your Signature in the Community

Re: is it possible to get category of expressions?


Stefan_Pendl wrote:

The filter is just a regular expression match on the expression name.

Any expression name not matching the pattern "p\d+" is user defined for instance.

 

You will have to build your own filter using regular expression matching.


 

It seems to be more than just name pattern matching; if you create a new part and manually create a new expression named "p9" (or any name that matches the "p\d+" pattern) it will show up as "user defined". Also, the API offers different methods to .CreateExpression or .CreateSystemExpression. NX must somehow flag the user expressions (and/or system expressions) to differentiate them.

Re: is it possible to get category of expressions?

I have a similar problem in NX10.

It appears I can cycle through all expressions in the part. However, I can't programmatically differentiate a system expression.

 

I tried it as locked expressions, but I can as a user lock an expression.

 

What does VisibleExpressions get? Does it get all the unlocked expressions?

MAYAHTT
www.mayahtt.com