Macro that provides live/dynamic reloading of external spreadsheets in FreeCAD.
Reasons to maybe use:
- May improve spreadsheet-driven modeling by using external spreadsheet editors with more functionality/stylizing/etc.
- Auto alias feature.
- Alternative solution for "Complex models and recomputes"
- Only works with spreadsheets in text formats: tsv & csv.
- Only tested with FreeCAD 0.20.2 on Linux using Python 3.10.9
- Create/Save FreeCAD document.
- Create/Save external spreadsheet (ending with '.tsv'/'.csv') in a folder called 'tsv'/'csv' in the same directory of the FreeCAD document.
- Run Macro.
- Change auto alias options if necessary.
- Every save/change of the external spreadsheet will automatically update FreeCAD's spreadsheet.
Usage Notes:
- Aliases will be applied to values that start with a digit or start with an equal sign. If you have equations with aliases and want FreeCAD to solve them, start with an equal sign, e.g. ' = OD/2 + offset '
- If you edit with a text editor, it may modify and replace the file when saving. Watchdog will generate a created event. Change your text editor behaviour. E.g. in Neovim, add this line to its config file: 'autocmd FileType tsv setlocal nowritebackup' (or csv instead of tsv.)
- Aliases cannot be renamed & moved at the same time, & cells cannot be created or deleted as well. Easier to just remember to save before and after attempting to rename alias(es).
- External Spreadsheets stops running after the FreeCAD document is closed.
Auto Alias Options:
- left->right (default)
- top->bottom
- table, left_top
View or Clone:
Code: Select all
git clone https://git.turoj.xyz/external_spreadsheets.git