VX CAD-CAM Logo
Any: Find articles with any keyword.
All: Find articles with all keywords (in any order).
Exact: Find articles with exact keywords (complete title must match exactly).
Title: Search titles only.
Content: Search article content only.
Both: Search both Articles and Content.
  VXCAD Base                   Jump to:
 
Knowledge Base Home Home | Knowledge Base Index Index | Sign Up as Writer Sign Up | Knowledge Base Glossary Glossary | Contact Us Contact Us
Home > All Categories > 17. VX Tools > Expressions & Equations > Equation Set Editor
Question Title Equation Set Editor

In this Article:

 
 

Equation Set Editor

Insert > Equation Set (Part Level)

Use this editor to build an equation or equation set (non-linear and simultaneous). As you build each equation, it is appended to the scrolling list of equations. An equation set is constructed of any number of individual expressions. You can test the results of the equation set on the active part by picking Apply.
 
 
Equation Set Editor
 
 
 

Operational Sequence

  1. Enter a variable name in the input field provided.
  2. Build an expression in the input field provided. You can use the Get Dimension or Get Variable buttons as described below to add dimensions or variables to the expression.
  3. After the expression is defined, press the Submit button. The values currently expressed in the Name, Expression, Min, and Max input fields are appended to the end of the scrolling list of equations or replaces any existing equation with the same variable name.

    The format used to display the definition of an equation in the list is:

    name = value {expression} [min, max]

    If an expression hasn’t been evaluated yet, its result is shown as an underscored blank space. The Apply button logs changes to the Equation Set to the database and updates the values.

  4. Repeat steps 1, 2, and 3 as desired to build an equation set.
  5. Pick OK to save the equation set or pick Apply, Reset, or Cancel as desired (see Other Options below).

 

Equation Input

  • Name
    Enter the variable name for the equation or pick Get Dimension and select a dimension or pick Get Variable and select a variable from the Variable Browser.

    The name of the dimension or variable will appear in the input field and will be used as the variable name.

  • Min/Max
    Enter the Minimum/Maximum value for the variable. An error message is displayed if a variable exceeds its limits. No change to its value is made.

  • Is distance
    Check this box if the variable as a distance. When a variable is flagged as a distance, the variable value is converted to the active units when it is displayed. The expressions that define a variable are still interpreted as millimeters and degrees unless alternate units are explicitly declared (e.g., 5.in).

  • Expression
    Build the expression for the equation in the text input field provided (e.g., eq1-10 or (v1+2)/v2). You can use existing dimensions and variables within the expression. Pick Get Dimension and select a dimension or pick Get Variable and select a variable from the Variable Browser. See also Using If, Then, Else Operators in Expressions

  • Get Dimension
    Select a dimension from the active part or press and hold the F7 key to select a dimension external to the active part.

    The dimension name will be appended to either the Variable Name or Expression input field depending on which one is currently active. The name of the root object that the dimension belongs to is automatically appended to the dimension name. Refer to Variable Naming Conventions for more information.

  • Get Variable
    Select a variable from the Variable Browser. The variable name will be appended to either the Name or Expression input field depending on which one is currently active. If the variable belongs to a root object other than the active root object, the name of the root object that the variable belongs to is automatically appended to the variable name. Refer to Variable Naming Conventions for more information.
 
 
VX Tips & Techniques
Displaying Dimension Names instead of Values
You can temporarily toggle the display format of all dimensions using the Toggle Dimension Names command ( View > Dimension Names).  This allows you to better choose what dimensions to use in your equations.  Use the same command to toggle the dimensions back to their values.
 
 

Equation Options

  •  Edit
    Edit EquationThe values for the selected equation will be displayed in the input fields. Edit the equation values and pick Submit update the equation in the set.


  • Delete
    Delete EquationDeletes the selected equations in the list.


  • Move Up, Move Down
    Move Down
    Move UpThese move the actively selected equations up or down in the equation list. This is useful for re-ordering equations that are solved sequentially.

  • Pick All
    Pick allSelect all equations in the set.


  • Unpick All
    Unpick allUnselect all equations that are currently selected.


  • Unpick Last
    Unpick lastUnselect the last equation selected.


  • Import
    Import EquationUse this option to import variables or equations from a file. This supports the "family-of-parts" concept by allowing equation sets to be externally driven by a tabulated list of variables and their values or by equations. See Importing and Exporting Equations for a more complete discussion of this topic.

  • Export
    Export EquationEnter a path and file name to export the equation set to or pick the folder icon to use the File Browser. Picking the Export button will then export the equation set to the file in ASCII format. See Importing and Exporting Equations for a more complete discussion of this topic.

  • Solution method
    Sets the method for solving the equation set. Select from the following:

    Sequential - Equations are solved sequentially (linear).
    Simultaneous - Equations are solved simultaneously (non-linear). This is
    the default method.

  • Submit Equation Input
    Submits modifications in the equation edit area to the main equation list at the top of the Equation Set Editor. If the equation doesn’t already exist in the list, it is added Before or After the actively-highlighted equation based on the setting of the Before/After toggle (see below).

  • Before, After Active Item
    Insert the currently defined equation before or after the selected equation. Build the new equation in the input fields, then select this button to Add the equation to the list.

  • Clear Equation Input
    Removes all data entered in the Equation Input section of the Equation Editor.
 
 

Other Options

  • OK - Saves the equation set and closes the Editor.
  • Apply - Logs changes to the Equation Set to the database and updates the values in the list.
  • Reset - Restores the equation set as it was previously saved.
  • Cancel - Closes the Editor without saving the equation set.

 

Importing and Exporting Equations

The Import and Export buttons on the Equation Set Editor allow you to import or export variable values or equations to or from an ASCII file. If the variable already exists, you can choose to have its value updated from the file. If it does not exist, it is added to the Equation Set. The file formats for variable values and equations are different. Each is illustrated below followed by the operational sequence.
 
 

ASCII File Format for Variable Values


Comments may be included in the file. They are lines preceded by a pound (#) sign. The first non-commented (#) row should be a list of comma-delimited or (tab-delimited) variable names preceded by a configuration label.

Subsequent rows should consist of a configuration name followed by a comma-delimited list of variable values that correspond to the variable names in the first row. If the character @ is appended to the end of a variable name (e.g., Config0001@), It will be flagged as a distance variable.
 
 

ASCII File Format for Equations

 
If the first non-blank, non-comment (#) line in the file contains the keyword "equations" (upper, lower or mixed case), it is assumed that subsequent lines contain equations formatted just as they appear in the in the Equation Set Editor, as shown below :

Variable_Name=result {expression} [min,max]

"result" should be followed by a units abbreviation (e.g. mm) if the variable is a distance. If the value of "result" is not known, enter it as zero. Once the equations are loaded, the Solve button can be used to calculate the variable values (i.e. results).

The equation format should be followed exactly, including the inclusion or exclusion of blank spaces. The only exception is the format of "expression", which is not sensitive to the inclusion of extraneous blank spaces.

Enter min,max as [0,0] if there are no known or intended minimum and maximum bounds for "result".
 
 

Operational Sequence (Importing Equations)

  1. Pick the Import button from the Equation Set Editor.
  2. Enter the path and file name of the file to import or export in the text field provided or pick the folder icon to select a file using the File Browser.
  3. Pick the Import button and select a file using the File Browser. If the file contain variable values (see example above), it is opened and loaded into the Import Variable Data Form shown below (go to step 3). If the file contains equations (see example above), it is imported directly into the equation list and you are given the opportunity to overwrite any values if the equations currently exist in the list.
  4. Select a row of data from the form and pick OK. The highlighted row of data is parsed and used to update the active Equation Set.
The new variables/values imported into the Equation Set are not applied to the database until the OK or Apply buttons are pressed. Before the new data is applied to the database, the original data can be recovered with the Reset button. Once the data is applied to the database, the previous set of equations may be recovered using the Undo command.
 


Import Variable Data Form


Variables Imported into the Equation Set Editor (only partially shown)

 

Operational Sequence (Exporting Equations)

  • Pick the Export button and enter a file name to export to using File Browser. The file extension is optional (e.g., equation.txt). The file will be exported to the file in ASCII format (refer to the example above).

 

Authored by: VX Technical Support
Click Here to View all the articles in Expressions & Equations category.
File Attachments File Attachments
There are no attachment file(s) related to this article.
Article Information Additional Information
Article Number: 964
Created: 26 Jan, 2009 4:12 AM
Last Modified: 7 May, 2009
Rating No Rating
Article Options Article Options
Print Question Print this Article del.icio.us Bookmark del.icio.us Bookmark
Email Question Email this Article to Friend Digg It Digg It
Export to MS Word Export to MS Word Furl It Furl It
Bookmark Article Subscribe to Article Subscribe to Article
 
Related Questions Related Articles
  1. Equations, Expressions and Variables
  2. Using Embedded Text Variables
  3. Create/Edit Local Variable (3D/2D)
  4. Variable Browser
  5. Referencing Variables from Parts Associated with Drawing Sheets
  6. Edit Part Equations
  7. Insert Sketch Equations
  8. Valid Expression Functions
  9. General Notes for Equations and Expressions
  10. Editing Command Line Expressions
  11. Using Units within Expressions
  12. Using If, Then, Else Operators in Expressions
  13. Insert Part Equations
  14. Variable Naming Conventions
  15. Variable Names and Sketch Dimensions
  16. Using Command Line Expressions
 
 

Powered by VX CAD/CAM