This video is a FreeCAD tutorial that directly answers a user's question on how to manage variable sets (VarSets) effectively in assemblies composed of multiple separate part files. The primary goal is to use a single, common VarSet to parametrically control all components without creating redundant sets. The tutorial demonstrates two main approaches: direct referencing using the expression editor and using FreeCAD's "Make Link" feature. A critical concept explained is the problem of "circular dependencies," which occurs if the master VarSet is placed within the main assembly file and then linked to its component parts. The video clearly demonstrates this error and provides the solution: the master VarSet must be located in a separate file—either one of the component part files or a dedicated data file—and then linked to the other parts to maintain a clean, functional dependency tree.
Managing Assembly Variables in FreeCAD
0:00 User Question: The video addresses a user's question on how to create a single, common VarSet to control an assembly made from multiple part files, avoiding the creation of a new VarSet for each part.
0:34 Method 1: Direct Referencing: This method demonstrates how to create a "parent" file containing a VarSet and a separate "child" file with a part. The part's dimensions in the child file can be linked to the VarSet in the parent file using the expression editor.
2:50 Potential Linking Issue: A common problem is shown where opening the child file alone results in a "document not found" error because the link to the parent file is broken.
3:17 Solution to Linking Issue: The solution is to save, close, and then reopen both the parent and child files. This allows FreeCAD to properly register the document names, creating a robust link that works even when the child file is opened first (which then automatically opens the parent).
4:39 Method 2: Using "Make Link": The video sets up a more complex example with two separate part files and an assembly file. This method uses the "Make Link" tool to share a VarSet between files.
6:47 The Circular Dependency Problem: A critical pitfall is demonstrated. If you place the master VarSet inside the assembly file and then try to link it to the component parts, FreeCAD will flag a "circular dependency" error upon saving.
9:05 Correct Approach to Avoid Circular Dependencies: To solve this, the master VarSet must exist outside the assembly file. The video moves the VarSet into one of the part files ("Part 1").
9:16 Linking the Master VarSet: From "Part 1," the VarSet is linked to "Part 2" (using the link tool or by holding Alt and dragging). Now, both parts can be parametrically controlled from the single VarSet located in "Part 1."
11:56 Key Takeaway: For a single VarSet to control an entire assembly, it cannot be located within the assembly file itself if its values are used by the parts. The recommended practice is to place the master VarSet in one of the component part files or in a completely separate "data" or "master" file.