Finding and Fixing SOLIDWORKS Circular References

Article by GoEngineer on May 16, 2020

A Circular Reference can occur when two or more assembly components share an external reference. For example, a rebuild of component1 requires the rebuilding of component2, but component2 then requires a rebuild of component1, and so on.

Another way it can happen is in the equation manager, where an equation is wholly or partially defined by another equation (or value), but that second equation (or value) is tied to the first.

A Circular Reference can manifest itself as the presence of reoccurring rebuild symbols in the Feature Manager Tree. Rebuilding the assembly will cause the rebuild symbol to move from one component to another. Further rebuilds of the assembly may cause the rebuild symbol to cycle back to the original component. With each rebuild, the rebuild symbol will loop through all the affected components. However, the rebuild symbol will not be present if one of these parts is opened in a separate window.

Circular references can also make their presence known by the appearance of rebuild errors in the components affected by the Circular Reference. When one part is edited in context of the assembly the rebuild errors may appear in some (or all other) affected components. These rebuild errors will typically disappear after exiting Edit Assembly mode.

How to find a Circular Reference

The most evident way of finding where a Circular Reference may be is when the rebuild symbol appears on a feature in the FeatureManager Tree. This is the only way you’re really going to know where to start making changes. If you rebuild and still see this symbol there is most likely a Circular Reference.
Here are some of the steps for assemblies and parts.

  • Run Performance Evaluation (previously called AssemblyXpert) when you first open the Assembly. It will identify the potential existence of a Circular Reference.
  • Click the Rebuild icon, or press Ctrl+Q, for a forced rebuild.
  • Look for a rebuild symbol in the Feature Manager Tree that will not go away.
  • Look at the feature, sketch, or component.
  • Suppress sketch relations, features, or components and rebuild to see if the symbol disappears.
  • Close the model, and DO NOT SAVE.
  • Open the model and delete/fix the issues found to be causing the Circular Reference.

Because determining the source of a Circular Reference can be difficult and time-consuming, it is better to avoid circular references when you can.

One of the better ways to make sure you avoid Circular References while designing is to use layout sketches and blocks. Since changes are made from these sketches and blocks and propagate out to all referencing features, they can be used to control all external references.

When using layout sketches, the relationships are created such that the sketch drives everything else. However, nothing is stopping you from using other features in the assembly to drive the sketch.  Avoid this type of conflict because it can create sketches that change with every rebuild –  seriously impacting rebuild times. When using any type of in-context relations, be careful to establish one or more driving entities that are not driven by other entities.

TIPS

  • Avoid “Daisy chaining”, where A drives B, B drives C, and so on. A better practice is to make A drive both B and C directly.
  • If external references need to be added to components in an assembly, attach these external references to key components. These key components should not contain features with external references as this may introduce cyclic references.
  • Avoid adding relations from a top-level component to a component in a subassembly.
  • Avoid adding an external reference to a feature that already contains an external reference.
  • Avoid adding external references to time-dependent assembly features such as “Hole Wizard/Series” holes, “Component Patterns” and assembly cuts (extrudes, revolves, lofts).

Solving these types of issues usually requires an intimate relationship with the model to know exactly where all the interaction is taking place.

Examples

S-057225

SOLIDWORKS® now identifies equations that show characteristics of potential circular references, even if the equations are not actually in violation of a Circular Reference condition. For example, reference dimensions from a child feature, driving another dimension in the parent sketch, can create circular references.

File Download Link: https://goengineer.sharefile.com/d-sa9b35d03e9d4ab3b

‘D1@Sketch1’ is defined by an equation:
“D1@Sketch1″ = iif (“D2@Sketch1” < 6 , 10 , “test”)

When this equation evaluates as true everything solves correctly, but SOLIDWORKS® still warns you.

Change ‘D2@Sketch1’ to 6 and rebuild. The equation now solves as false and there is a circular dependency issue.
In either case, SOLIDWORKS® flags this as a potential Circular Reference situation.

You can turn off potential Circular Reference warnings via Tools > Options > System Options > Messages/Errors/Warnings > Display potential circular references in equations.

S-073146

If the ‘Automatic solve order’ option is always available, SOLIDWORKS® will not be able to identify the equations that cause potential Circular References.  For an example of this behavior download the ZIP file in the link below and extract it to a folder on your computer.

File Download Link: https://goengineer.sharefile.com/d-s56dc11085fb44dab

Then follow these steps:

  1. Open the sample part.
  2. Go to Tools | Options | Message/Errors/Warnings.
  3. Make sure that the “Display potential circular references in equations” option is set to “Everywhere” or “In equations dialog only”.
  4. Go to Tools | Equations. Notice that the “Automatic solve order” option is not active.
  5. Move the cursor over the “Automatic solve order” option. The option tip displays “Disabled due to potential circular reference in equations”.
  6. To identify the potential circular references move the cursor over the yellow triangle. The text tip displays the “Potential circular reference” message.
  7. Repeat step 2 then set “Display potential circular references in equations” option to “Never”.
  8. Press Ctrl+Q to rebuild part.

Notice the ‘Automatic solve order’ option is now active. However, selecting this option will not identify equations that have potential Circular References.

S-064386
One scenario that causes this is the use of driven dimensions in your equations. Driven dimensions depend on other dimensions, thus they have the potential to solve incorrectly. For example:

File Download Link: https://goengineer.sharefile.com/d-s65378f1886b4cc6a

  1. Open the attached part, “Potential Circular Reference”.
  2. Go to the View Menu, Hide/Show and select Dimension Names.
  3. Edit “Sketch1”. Make note of the 67.62mm dimensions, ‘D1’, ‘D4’, and ‘D6’
  4. Open the Equations dialog

Make note of the equation “D1@Sketch1” = “D6@Sketch1” where dimension ‘D6@Sketch1’ is driven. It is marked with a yellow triangle which tells you there is a potential Circular Reference issue.

In this example you can easily see that ‘D6@Sketch1’ is driven from ‘D4@Sketch1’. However, programmatically, it is very difficult to predict which dimension drives another dimension. Therefore, SOLIDWORKS® assumes or considers ‘D6’ to be dependent of ALL dimensions in Sketch1. As a result, if ‘D1’ is defined by an equation that references ‘D6’, then SOLIDWORKS® considers the equation to be potentially circular.

You can turn off potential circular reference warnings via Tools > Options > System Options > Messages/Errors/Warnings > Display potential circular references in equations.

Equation

For example, the following equations include a Circular Reference. The changes in the first equation cause changes in the second equation, which cause further changes in the third and first equation, creating an infinite loop. SOLIDWORKS® detects the Circular Reference and displays the text of the equations in red.

“D1@Sketch1@part_outside.Part” = “D2@Sketch1@part_inside.Part” + 2
“D2@Sketch1@part_inside.Part” = “Side” – 6
“Side” = “D1@Sketch1@part_outside.Part” * .5

About GoEngineer

GoEngineer delivers software, technology and expertise that enable companies to unlock design innovation and deliver better products faster. With more than 30 years experience and thousands of customers in high tech, medical, machine design, energy and other industries, GoEngineer provides best-in-class design solutions from SOLIDWORKS, Stratasys, Altair, CAMWorks, Creaform and Product Lifecycle Management (PLM).

View all posts by GoEngineer

Subscribe

Get the latest articles delivered daily to your inbox, unsubscribe at any time.