CSWP Part Modeling with Equations 2 — Questions and Answers
Question 1: In SolidWorks equations, which syntax correctly references a dimension named 'Width' in a sketch called 'Sketch1'?
- "Sketch1"@Width
- "Width"@Sketch1 (Correct answer)
- Width@Sketch1
- Sketch1.Width
Correct answer: "Width"@Sketch1
SolidWorks dimension references follow the format "DimensionName"@FeatureName.
Question 2: When you use the IIF() function in a SolidWorks equation, what does it do?
- Imports an external file into the equation editor
- Returns one of two values based on a conditional expression (Correct answer)
- Iterates a loop over dimension values
- Inserts an image reference into the model
Correct answer: Returns one of two values based on a conditional expression
IIF(condition, value_if_true, value_if_false) is a conditional function that returns different values depending on whether the condition is true or false.
Question 3: A global variable 'Thickness' is set to 5mm. Which equation correctly sets feature dimension 'D1@Boss-Extrude1' to three times the thickness?
- "D1@Boss-Extrude1" = "Thickness" * 3 (Correct answer)
- "D1@Boss-Extrude1" = Thickness * 3
- D1@Boss-Extrude1 = "Thickness" * 3
- "D1@Boss-Extrude1" = 3 / "Thickness"
Correct answer: "D1@Boss-Extrude1" = "Thickness" * 3
Both the dimension reference and the global variable must be enclosed in double quotes in SolidWorks equations.
Question 4: What happens to an equation-driven dimension when you suppress the feature it belongs to?
- The equation is permanently deleted
- The equation is suspended but not deleted, and resumes when the feature is unsuppressed (Correct answer)
- The equation recalculates using default values
- An error is thrown that requires manual equation removal
Correct answer: The equation is suspended but not deleted, and resumes when the feature is unsuppressed
Suppressing a feature suspends its equations; the equations remain intact and re-evaluate when the feature is unsuppressed.
Question 5: In the SolidWorks equation editor, the 'sgn()' function returns which values?
- The sine of an angle in degrees
- −1, 0, or 1 depending on whether the argument is negative, zero, or positive (Correct answer)
- The square root of a value
- The absolute value of a number
Correct answer: −1, 0, or 1 depending on whether the argument is negative, zero, or positive
sgn(x) returns −1 for negative inputs, 0 for zero, and 1 for positive inputs.
Question 6: You want an extrusion depth to automatically equal the diameter of a circular sketch. Which equation approach is most direct?
- Link the depth value to the sketch circle via a design table only
- Write an equation: "D1@Boss-Extrude1" = "D1@Sketch1" where D1@Sketch1 is the diameter (Correct answer)
- Use a sensor to detect the diameter and trigger a rebuild
- Export the model to Excel and manually set the relationship
Correct answer: Write an equation: "D1@Boss-Extrude1" = "D1@Sketch1" where D1@Sketch1 is the diameter
A direct equation linking the extrusion depth dimension to the sketch diameter dimension automatically maintains the relationship on every rebuild.
Question 7: Which of the following is a valid reason to use global variables instead of hard-coded numbers directly in equations?
- Global variables compile faster than numeric literals
- Global variables allow a single change to propagate to all equations that reference them (Correct answer)
- Hard-coded numbers are not supported in SolidWorks equations
- Global variables automatically create design tables
Correct answer: Global variables allow a single change to propagate to all equations that reference them
Changing a global variable in one place updates every equation that references it, making the model easier to maintain.
In SolidWorks equations, which syntax correctly references a dimension named 'Width' in a sketch called 'Sketch1'?