Journal: Selection Filter to default?
Journal: Selection Filter to default?
(OP)
Hello,
How does one set the selection filter of a BlockStyler.SelectObject to default ("No Selection Filter") so that you can select any object?
This is what I have so far:
However, this disables the selection filter.
Is there a solution?
How does one set the selection filter of a BlockStyler.SelectObject to default ("No Selection Filter") so that you can select any object?
This is what I have so far:
CODE -->
Dim selectionfilter(0) As MaskTriple
selectionfilter(0).Type = -1
selectionfilter(0).Subtype = -1
selection0.GetProperties.SetSelectionFilter("SelectionFilter", Selection.SelectionAction.ClearAndEnableSpecific, selectionfilter) However, this disables the selection filter.
Is there a solution?
NX10.0 Win8.1 64bit i7-3770K 16GB Quadro2000





RE: Journal: Selection Filter to default?
RE: Journal: Selection Filter to default?
I tried that, but it fails.
CODE -->
Dim selectionfilter(0) As MaskTriple selection0.GetProperties.SetSelectionFilter("SelectionFilter", Selection.SelectionAction.EnableAll, selectionfilter)NX shows an error dialog with "NXOpen.NXException: Second parameter is invalid"
The log shows "+++ Cannot specify mask_triples if action is enable all"
So I tried this
CODE -->
selection0.GetProperties.SetSelectionFilter("SelectionFilter", Selection.SelectionAction.EnableAll, Nothing)but the same error occurs.
NX10.0 Win8.1 64bit i7-3770K 16GB Quadro2000
RE: Journal: Selection Filter to default?
You have the parameters in SetSelectionFilter mixed up.
The second is SelectionAction but you have put the selectionFilter in there. You need to put EnableAll in the third parameter.
Paul
Paul Turner
CAD & Process Engineer
Mastip Technology
RE: Journal: Selection Filter to default?
The strange thing is that all selection actions work, except EnableAll.
I could do selection0.ResetFilter() , and that will enable most of the object types, but not Sketch.
Here's the workaround:
CODE -->
This will reset the selection filter (to enable most object types) and add the Sketch object type to the filter, which adequately solves my problem.
NX10.0 Win8.1 64bit i7-3770K 16GB QuadroK2200