In previous releases of SolidWorks you may have noticed that dialogs did not always pop up in front when they are most relevant. For example, when you edited a design table in SolidWorks 2012 or older a new window, Excel appeared in front of SolidWorks, but the accompanying dialog came up in the back. As a result Excel seemed to be unresponsive and you had to return to SolidWorks window using the task bar, close that dialog, and then return to Excel for it to work again.
This video uses the default values property to set the value of multiple lists based on the selection of any one pick.
Default values extended, using default values to have interdependent lists
A common problem faced by DriveWorks administrators is how to handle multiple interrelated fields. In this example we have 3 inputs, customer, contact, or region. The desired behaviour is to have all three inputs selectable, but a selection in any list sets the value for the other two lists. Traditionally this is done by having two selections, one to choose the selection method and the other to make the actual selection. This setup can be useful, but the purpose of this tip is to show you a less intuitive setup that can be more user-friendly.
With this setup the user always sees all three lists, but a selection in any one of the three lists will set the values for both of the other lists. Setup is actually pretty simple, first set the items rule to return the desired list for each of the inputs. Next set the default value of the first input to be based on the second input, default value of the second input based on the third input, and the default value of the third input to be based on the first. Therefore this will work for two or more inputs with no limit to the maximum. This setup reduces the complexity of the rules (especially when there are more than 3 fields) while making the user interaction friendlier. Just be sure to give feedback to the user that they only need to select one of the inputs.
In my next video I will talk about improving query performance
Event listeners are used to execute code when a certain event takes place, such as a user creating a new part, or opening an assembly.
How to program event listeners using macros
Event listeners allow you to run code when a user performs a certain action. For example when the user clicks new document an event listener could trigger code to save the currently active document.
To set up your event listener you need to start by creating a new macro.
This is the third and final chapter in the series about using Query Data Values. I recommend you watch the first two videos (PART 1 & PART 2) before this one, however it is not required to follow this video. The purpose of this tip is to show off some of the rule building features, which are available in DriveWorks 8 and onward. I will also show you how to have a single control allow user input or display an output using the override rule property.
This is part 2 of a series, if you have not already watched PART 1 please do so, this video is a direct continuation from there.
While working on my DriveWorks Solo Certification, I was shown a really fast way to copy existing rules into new rules. It is faster than CTRL+C (copy), CTRL+V (paste).
Forms in DriveWorks 8 are more configurable than ever before. One of the major focuses of the development of DriveWorks 8 was ease of use for users and developers. Some of the major enhancements are full support of transparency in images, image buttons, and dynamic form positions. In English this means that the controls on forms can overlap and they can be repositioned based on user selections.
The result of these changes is that forms can be made much more intuitive and flexible than possible in DriveWorks 7. In the three images below the colour of the light is selectable by clicking on the picture. For example, if the bottom light is clicked, the top light image changes and so does the bottom light.
In this example the bottom image is clicked, which results in the image changing so that the green light appears to turn on and the red light appears to turn off. In some applications this could be more than is required, or small forms are critical, DriveWorks 8 provides the flexibility to handle this as well.
In this case the image updates based on the selected option. Clicking on the image has no effect, the radio buttons must be selected. The functionality in this example has been available in DriveWorks for the last several years, but what is new here is that the background colour of the image is dynamic as well. Notice in the first image the background is red, but in the second image it is green. Also notice that the area around the image is transparent. This transparency allows for multiple controls to overlap:
This addition may appear small at first, but it has large ramifications about how a form can be used. For example if the project had a door with multiple handle options (brass, chrome, brushed nickel, etc) and multiple window shapes (rectangular, circular, rectangular with half circle, etc.) it is possible to handle all of the variations with an image of each option, rather than an image for each combination. So rather than having 3 images for a brass handle, 1 for each of the windows, an image for the handle and an image for each window is all that is required. The benefits are compounded by the number of independent options available. For example if the door had 8 different colours, 4 different handles, and 5 different windows available, without transparency a total of 160 images would be required. But with transparency available only 17 images would be required.
Finally there is support for hyperlink controls in DriveWorks 8. The benefit of the hyperlink control is that it supports a separate image for default and mouse over. This allows you to create most of the effects commonly seen on modern websites, but with the benefit of having an easy to use form builder.
An example of how this works dynamically can be seen at the top of this webpage. If you mouse over the solutions button it changes colour to appear like it is active. The hyperlink property of the control is dynamic as well, so that selecting a different coloured light could affect the website address that the hyperlink button takes you too.
As a result of the changes to the forms in DriveWorks 8, much more dynamic and intuitive forms can be created.
One of our services team members, Paul, always tells me that “If the customer can do it manually with their current systems, we can automate it!”. By utilizing a combination of programming in the SolidWorks API, Microsoft Office, SQL data management and some elbow grease, Javelin helps companies such as Calendar Club, realize the potential of speeding up, and vastly improving their business processes, from design, through to production.