cancel
Showing results for 
Search instead for 
Did you mean: 

Change Type Filter NXOpen C#

Pioneer
Pioneer

Hi Guys,

 

How do I change the Selection Filter of the TypeFilter with NXOpen.

Is there a possibility to do this ?

 

Thanks!

7 REPLIES

Re: Change Type Filter NXOpen C#

Phenom
Phenom

When your code runs a selection function, you can limit the choices presented to the user; but I know of no way to "select" one of the available choices for the user.

Re: Change Type Filter NXOpen C#

Pioneer
Pioneer
ok thanks for your help.

one question:
Are there Function to Limit the choices or is it only possible with if and else clauses ?
For Example:
If the user select Spline then Infobox and delete the Spline from the Collector

or are there other possibilities ? (Attributes, Functions)

Re: Change Type Filter NXOpen C#

Esteemed Contributor
Esteemed Contributor

Depending on the selection methods you are using it is possible to set a SelectionMask, since there are many ways to select objects in NX, the exact API function in use is needed to further help you.

You may also want to check the GTAC solution center for some API samples for selecting objects, omit the language of your choice in the search, since there is not always an example for every language, but it is easy to translate from one to another.

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: Change Type Filter NXOpen C#

Phenom
Phenom

Ildon wrote:
ok thanks for your help.

one question:
Are there Function to Limit the choices or is it only possible with if and else clauses ?
For Example:
If the user select Spline then Infobox and delete the Spline from the Collector

or are there other possibilities ? (Attributes, Functions)


One of the selection functions uses what is known as "mask triple" values. You can use these masks to limit what a user can select. If this does not give you enough control, there is another selection method that will let you process the user's selection to further refine it before completing the selection process.

 

Here is an example of using mask triple values:

http://www.nxjournaling.com/content/using-mask-triples-selectobject-routine

Re: Change Type Filter NXOpen C#

Valued Contributor
Valued Contributor

If my memory serves correctly it is possible to set a selection mask in GRIP by using "MASK/" at any time.

And this setting is still active after the GRIP execution stopped.

Would be nice to have the same in .NET!

Herbert Macho
EBNER Industrieofenbau
AUSTRIA

NX10.0.3.5 (TeamCenter10 and Native)

Re: Change Type Filter NXOpen C#

Phenom
Phenom

"And this setting is still active after the GRIP execution stopped."

 

Actually, that sounds like it would be annoying.

Re: Change Type Filter NXOpen C#

Valued Contributor
Valued Contributor

I have not used GRIP in the last 5 years but I think the behaviour has not changed.

If you use MASK in your GRIP code you have to make sure to reset the selection mask using MASK/ALL before leaving the GRIP routine.

But I had situations where I wanted to limit the selection to drafting notes for example, even if program execution stopped. To reanable full selection, it was required to start another GRIP program from a toolbar.

Herbert Macho
EBNER Industrieofenbau
AUSTRIA

NX10.0.3.5 (TeamCenter10 and Native)