DriveWorksXpress Quick Tips: Writing Rules

preview_player
Показать описание
Rules are an integral part of a DriveWorksXpress project.

Rules make the whole project possible by controlling file names, configurations, features, and dimensions.

A rule can be anything from concatenating text, to doing some simple math, to just deciding whether a feature should be included based on some input.

In this video, we build a rule for everything except for configurations (see DriveWorksXpress Quick Tips: Configurations for more information on that).

Here’s a run-down of the steps we take in this video:
1. For the file name rule we will do something simple, taking the customer name and adding that to the selected material. We do that by writing the rule “Name & “-“ & Material”. This will take the Name input, add a “-“ after it, and then add the Material input.

2. Dimension rules can be trickier than a File Name rule. For the inner and outer diameter, we will simply choose for that to be the user input in the form. For the size of the ball, we will do some math to determine the spacing between the 2 rings and set that as the diameter.

3. Feature rules will determine if a feature exists or not. For the mounting holes on the side of the bearing, we will decide if they exist based on the check box in the form. We will say that if the box is checked then we want the holes to exist (or be unsuppressed) and if the box is not checked then we want the feature to be deleted (you could suppress it instead).

4. We will now run the project to see how it does and if any rules need adjusting. If something goes wrong, be sure to look at the right-side task bar for any errors that may have occurred.
Рекомендации по теме