Showing results for 
Search instead for 
Do you mean 
Reply

Select view in Block Styler

Hello everyone!

 

How can I build a Select view button in Block Styler, similart to the OOTB NX one? It is not present in Block Styler, so I guess I need to take some more general type and modify it? Could you please explain?

 

1.png

8 REPLIES

Re: Select view in Block Styler

Any ideas?..

Re: Select view in Block Styler

Have you tried using a simple selection block and set the filter on it to only allow views? I've not tried this, but you should be able to do the following (pseudo-code):

MaskTriple mt[] = new MaskTriple[1]
mt[0].Type = UFConstants.UFConstants.UF_view_type
mt[0].Subtype = 0
mt[0].SolidBodySubtype = 0
PropertyList pl=SelectionBlock.getProperties()
pl.SetSelectionFilter("SelectionFilter", SelectionAction.CLEAR_AND_ENABLE_SPECIFIC, mt)

To make the block look nice you could also set the image:

pl.SetBitmap("view_select")
Graham Inchley Snr R&D Engineer (Systems Development), Sandvik Coromant
Lenovo ThinkPad W540, Win7, 16GB. Developing in: Java | C | C# | KF
Production: NX8.5.3.3 MP11 64bit Testing: NX9.0.2.5

Re: Select view in Block Styler

Haven't tried it yet, but I was slowly working my way toward the same solution. Sorted out the bitmaps question, for example. Man Happy What selection block shall I use? "Select Object"?

Re: Select view in Block Styler

Yes, SelectObject is the general use one that you should be able to modify to look/work like the native selection blocks that are not directly covered by BlockStyler.

Graham Inchley Snr R&D Engineer (Systems Development), Sandvik Coromant
Lenovo ThinkPad W540, Win7, 16GB. Developing in: Java | C | C# | KF
Production: NX8.5.3.3 MP11 64bit Testing: NX9.0.2.5

Re: Select view in Block Styler

Thank you! I'll get busy now.

Re: Select view in Block Styler

Just one question - is it possible to hide number of selected symbols in the name string? It is a bit misleading when only a single selection is required.

Re: Select view in Block Styler

Hmm.. I've never really thought about that. But as far as I can tell, I don't think so.

You'd think if the selection mode was single, it would automatcially be omitted.

Graham Inchley Snr R&D Engineer (Systems Development), Sandvik Coromant
Lenovo ThinkPad W540, Win7, 16GB. Developing in: Java | C | C# | KF
Production: NX8.5.3.3 MP11 64bit Testing: NX9.0.2.5

Re: Select view in Block Styler

You'd think if the selection mode was single, it would automatcially be omitted.

That was my impression as well.