Macro Spreadsheet Dependency Inspector

Macro Spreadsheet Dependency Inspector

Description
The macro displays, for a selection of spreadsheet cells, all dependencies between spreadsheet cells and even between a cell and object properties.

Macro version: 01.02
Last modified: 2026/06/03
FreeCAD version: All
Download: ToolBar Icon
Author: 2cv001
Author
2cv001
Download
ToolBar Icon
Links
Macro Version
01.02
Date last modified
2026/06/03
FreeCAD Version(s)
All
Default shortcut
None
See also
None

Description

Temporary code for external macro link. Do not use this code. This code is used exclusively by Addon Manager. Link for optional manual installation: Macro


# This code is copied instead of the original macro code
# to guide the user to the online download page.
# Use it if the code of the macro is larger than 64 KB and cannot be included in the wiki
# or if the RAW code URL is somewhere else in the wiki.

from PySide import QtGui, QtCore

diag = QtGui.QMessageBox(QtGui.QMessageBox.Information,
    "Information",
    "This macro must be downloaded from this link\n"
    "\n"
    "https://raw.githubusercontent.com/2cv001/SpreadsheetDependencyInspector.FCMacro/main/SpreadsheetDependencyInspector.FCMacro" + "\n"
    "\n"
    "Quit this window to access the download page")

diag.setWindowFlags(QtCore.Qt.WindowStaysOnTopHint)
diag.setWindowModality(QtCore.Qt.ApplicationModal)
diag.exec_()

import webbrowser 
webbrowser.open("https://raw.githubusercontent.com/2cv001/SpreadsheetDependencyInspector.FCMacro/main/SpreadsheetDependencyInspector.FCMacro")

The macro Spreadsheet Dependency Inspector displays, for a selection of spreadsheet cells, all dependencies between spreadsheet cells and even between a cell and object properties. Everything is shown as an expandable tree that displays the cell name, its alias, its formula, and its value. It displays recursively:

The macro is multilingual, currently supporting English and French. The language used is the one you selected in your FreeCAD preferences.

As a complement to this macro you may also want to check Macro Sketch Constraint From Spreadsheet.

Examples of use

Usage

In a SpreadSheet, select one or several cells, then run the macro.

The refresh button image recalculates the analysis, for example after you modify a cell or change the selection.

The expand/collapse button lets you expand or collapse the whole tree. You can also do it branch by branch by clicking on the ▶ or ▼ symbols.

Choose the information you want to display:

With a simple click, you can directly modify the labels or aliases and the content (expression).

A double‑click on a constraint row opens the sketch containing that constraint and selects it to highlight it.

Forum discussions

In English: https://forum.freecad.org/viewtopic.php?t=105015

In French: https://forum.freecad.org/viewtopic.php?t=104883

Credits

Thanks to L'ami René for tests, ideas, the icon and the example project!

Thanks to flachyjoe for the insightful comments on the ergonomics.

Download