FreeCAD / FreeCAD-library

A library of Parts for FreeCAD. WARNING - This library is huge. It might take a long time to download and make the addons manager unresponsive for many minutes.
1.27k stars 1.06k forks source link

Spreadsheet references are not updated when parts are added and spreadsheet names are changed #329

Open azuk opened 3 years ago

azuk commented 3 years ago

There are parts in the library that contain spreadsheets. For example, each sprocket part in the directory https://github.com/FreeCAD/FreeCAD-library/tree/master/Mechanical%20Parts/Chains/Sprocket/ISO%20606/Simplex%20%201%C2%BDx1 contains a spreadsheet named "Data" that contains parameters for the part.

When I add the first sprocket to my empty document, all is well. When I add another sprocket, the system automatically renames second sprocket's "Data" spreadsheet to "Data001". However, references to spreadsheet cells are not renamed -- they are not \<\>.Wt, they are \<\>.Wt. In other words, the second sprocket uses the parameters of the one that was added first.

OS: Ubuntu 20.04.3 LTS (KDE/plasma) Word size of FreeCAD: 64-bit Version: 0.20.24436 (Git) Build type: Debug Branch: master Hash: bf527ba5ed9cbde0813e702c2f3793fb55f5be7c Python version: 3.8.10 Qt version: 5.12.8 Coin version: 4.0.0 OCC version: 7.3.0 Locale: English/United States (en_US)

k2-mirror commented 2 months ago

I think the proper way to use the library is the following: 1- Load the piece into a new blank document 2- Set all the necessary parameters in the spreadsheet 3- Select the resulting part and in the "part" workbench and click on "Part -> Create a copy -> Create simple copy" 4- Rename this copy with the name you want 5- Copy and paste the "simple copy" into your project If you need another piece with other parameters, you simply have to repeat the process from step 2.

With simple copies you make FreeCad work more fluidly, since you free freecad from having to recalculate many things.