Astuce technique de DriveWorks : Comment créer un bouton de transition grisé [VIDEO]

Article by Jim Peltier, CSWE updated March 4, 2015


Making forms in DriveWorks is nice and easy, but getting the user to fill them out completely is….. also easy! I bet you thought I was going to say it was a different story, didn’t you? Well, you can prevent them from proceeding by making the transition button greyed out.

In this example, I’ve created a form with 4 checkboxes. My design intent is that the user must check all the boxes in order to proceed. However, by default, the Proceed button is always available. Let’s see how it’s done:

As you can see, I can setup a rule for the availability of the button. If the rule solves as FALSE, then the button is greyed out. I’ve bypassed this using a variable (called “CheckAllTheBoxes”) but this is simply to make troubleshooting and editing the project easier. I could also have put my massive nested IF statement in that place instead of in the variable. Since I didn’t show it in the video, the variable’s rule is as follows:


I could shorten that to exclude FALSE so many times, but I like seeing what I’m getting and it makes it easier to show. Other examples would be IF(ComboBoxReturn=””,FALSE,TRUE) or IF(TextBoxReturn=””,FALSE,TRUE). Note the reversal of the TRUE/FALSE on these. Because the blank means the field has not been completed, it is not what we want. In my above example, when I say IF(BoxesReturn,TRUE,FALSE) it’s short for IF(BoxesReturn=TRUE,TRUE,FALSE)

As far as where I used that variable, I went to the Specification Flow and found the State in question. Then I clicked Edit. Once in the Edit State dialogue window, I right-clicked on the Transition and chose Edit Conditions from the resulting menu. In the Conditions Editor window, I was able to drag and drop the Check Value condition from the Toolbox window into the Conditions window. I then edited the Value field for this to read =IF(DWVariableCheckAllTheBoxes,TRUE,FALSE).

I could have also simplified this to =DWVariableCheckAllTheBoxes since it is also a boolean (true/false) variable.

Obviously your application will be different, but I hope this simplified example has shown you what is needed to make a transition button greyed-out in DriveWorks.

Jim Peltier, CSWE

Jim utilise SolidWorks depuis 2001, et a passé la plupart de son temps à travailler dans la conception d'équipements de fabrication industrielle automatisée. Depuis juillet 2012, il travaille en tant qu'expert en applications chez Javelin Technologies à Oakville (Ontario) et est un expert SolidWorks certifié (CSWE).