cancel
Showing results for 
Search instead for 
Did you mean: 

Blockstyler properties

Pioneer
Pioneer
Hi, Need help in understanding two properties "StepStatus" & "AutomaticProgression" in Block UI styler. I can see StepStatus as CIG & AutomaticProgression as CSG in documentation. I am trying to do cursorLocation0->GetProperties()->SetLogical("AutomaticProgression",true); in update_cb() it is not passing control to next block & how StepStatus going to be set programmatically. StepStatus is not going to work in update_cb() ? TAK
9 REPLIES

Re: Blockstyler properties

Phenom
Phenom

StepStatus

This is how you tell BlockStyler how to handle this block. Options are:

  • Required
    You must select something for this block before OK/Apply can be active
  • Optional
    OK/Apply can be active even if you haven't selected anything for this block
  • Satisfied
    The selection for this block is complete so OK/Apply can be active (I think you also actually have to supply the objects that are selected to the block when setting this in the Initialise callback).

You can only set these values when you design the dialog (this is the C in CIG) or in the Initialise callback that is called when the dialog is created at run time (this is the I in CIG).

So, no, you can't set StepStatus in the Update callback.

 

AutomaticProgression

This defines if focus will move to the next block as soon as the user selects something for this block. This is usefull for single object selection or, like in your case, location selection.

You can set this value while designing the dialog (C in CSG) or at any time during your code depending on the requirements (S in CSG).

 

For clarity the G in CIG and CSG is Get, which means you can get the current value, which can be done at any time.

 

Hope this helps to make it clearer.

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: Blockstyler properties

Pioneer
Pioneer
thanks Graham for the explanation. cursor0 block doesn't transfers or moves the control to the next block when i set cursorLocation0->GetProperties()->SetLogical("AutomaticProgression",true); in update_cb().

Re: Blockstyler properties

Phenom
Phenom

Just setting AutomaticProgression to true will not make control move to the next block, it just sets the dialog so that the next time the user slects something, then control will move to the next block.

Where in update_cb are you setting it? Is it in the code section that executes when cursorSelection0 is changed? If so it is too late then as the user has already selected something.

If you always want your cursorSelection0 block to pass control to the next block when the user makes a selection, I would suggest changing it in the BlockStyler, or in the Initialise callback.

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: Blockstyler properties

Pioneer
Pioneer
Hi Graham, Yes I tried to set in update_cb(), intialize_cb() also but didnt succeed. I have cursor0 ,togglle0,string0, selection0 as block in my UI, I am looking for something when I select cursor0 I can pass my control to selection0. One more thing cursor0 has StepStatus required default. TAK

Re: Blockstyler properties

Phenom
Phenom

I justr tried creating a dialog like you suggested (with the blocks in the order you described) and then in the initialise callback I set cursorLocation0 to have StepStatus = Required and AutomaticProgression = true.

I then ran the code and cursorLocation0 had initial focus, I clicked somewhere to specify a location and focus then jumped to selection0. This is how it should work.

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: Blockstyler properties

Pioneer
Pioneer
One Quick thing, in the intialize, you set cursor0 (autopreogression=true), so after picking point, your block focus moves to selection0 right? or toggle0 ?

Re: Blockstyler properties

Phenom
Phenom

After picking a point the block focus moves to selection0.

The whole AutomaticProgression mechanism only works between selection type blocks. Toggles, String etc blocks cannot participate in that type of focus control.

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: Blockstyler properties

Pioneer
Pioneer
Hi, I tried but didn't succeed, it seems to work when i set StepStatus to required(for both-cursorlocation0 & selection0)(while designing dialog), then automatically focus moves from cursorlocation0 to selection0 block. But when i set StepStatus to optional (in dialog) it didn't work

Re: Blockstyler properties

Phenom
Phenom

I must admit I haven't thought about how this works before, usually I only use Required selections...

I did a quick test with cursorSelection0 having StepStatus=Required and selection0 having StepStatus=Optional and it looks like automatic progression will only work if there is another selection block after the current one that has StepStatus = Required. With this set up you will notice after making a cursor selection, the OK/Apply buttons become active as all Required selection blocks are now satisfied.

The logic behind that (I'm guessing) is that if all other selections are Optional, then don't give focus to any of them as that might indicate that the user MUST select something. The user will have to decide if they want to select anything else and click that block to activate it.

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