Hide Table of Contents

Defining a Component Suppression Equation

You can use an equation to suppress and unsuppress a component in an assembly.
In the Add Equation dialog box, you use the Visual Basic IIf function to specify when to suppress or unsuppress a component.

The syntax of the Visual Basic IIf function is:

iif(expression, truepart, falsepart)

where:
  • expression is the expression you want to evaluate
  • truepart is the value to use if expression is true
  • falsepart is the value to use if expression is false
  1. Open the Add Equation dialog box:
    1. Click Tools > Equations.
    2. In the Equations dialog box, click Add.
  2. In the FeatureManager design tree, click the component you want to suppress and unsuppress.

    The component name appears in the Add Equations dialog box.

  3. In the dialog box, complete the equation using the syntax of the Visual Basic IIf function. See examples below.

    You can type the entire equation or use the following tips to enter various pieces:
    • To insert a global variable, click it in the Equations folder in the FeatureManager design tree.
    • To insert a dimension name, click it in the graphics area.
    • To insert "suppressed" and "unsuppressed", click the suppress and unsuppress buttons in the dialog box.

  4. Click OK.

    The new equation is added to the Equations dialog box.

  5. Click OK to close the dialog box.

    To test the equation, change the value of the controlling parameter (the expression in the IIf statement). Then click Rebuild (Standard toolbar) and verify that the model changes as you intended.

Examples


  • This equation suppresses the second instance of a pin when the value of global variable "overall length" is less than 40.

    "pin<2>" = iif ( "overall length"<40, "suppressed" , "unsuppressed" )

  • This equation unsuppresses the third instance of a support when a particular dimension of a beam is greater than 100.

    "support<3>" = iif ( "D3@Sketch1@beam.Part">100, "unsuppressed" , "suppressed" )



Provide feedback on this topic

SOLIDWORKS welcomes your feedback concerning the presentation, accuracy, and thoroughness of the documentation. Use the form below to send your comments and suggestions about this topic directly to our documentation team. The documentation team cannot answer technical support questions. Click here for information about technical support.

* Required

 
*Email:  
Subject:   Feedback on Help Topics
Page:   Defining a Component Suppression Equation
*Comment:  
*   I acknowledge I have read and I hereby accept the privacy policy under which my Personal Data will be used by Dassault Systèmes

Print Topic

Select the scope of content to print:

x

We have detected you are using a browser version older than Internet Explorer 7. For optimized display, we suggest upgrading your browser to Internet Explorer 7 or newer.

 Never show this message again
x

Web Help Content Version: SOLIDWORKS 2011 SP05

To disable Web help from within SOLIDWORKS and use local help instead, click Help > Use SOLIDWORKS Web Help.

To report problems encountered with the Web help interface and search, contact your local support representative. To provide feedback on individual help topics, use the “Feedback on this topic” link on the individual topic page.