PR#2862: Configuration Table using Spreadsheet
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: PR#2862: Configuration Table using Spreadsheet
I started to implement a parametric CNC machine project. In it I use a lot of files for machine parts. First I created parameter tables in each file. Then, due to the need to manually update the details after changing the top-level parameters (such as the dimensions of the working field, etc.), it was decided to transfer all the tables to one file. For simple parameters of length, width, radii, etc., this went without problems. Problems arose when trying to create a Configuration.Enum that is defined in an external file (ТаблицаПараметров.FCStd). I couldn't do it. Is it possible at all?
https://github.com/Kuzma30/FREECAD_CNC my project. File where I have problem is "ПроставкаY.FCStd". File with tables is "ТаблицаПараметров.FCStd".
OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.20.30870 (Git)
Build type: Release
Branch: LinkDaily
Hash: ed30f75cf752508a3c544b907b036118f07d65b9
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.6.0
Locale: Ukrainian/Ukraine (uk_UA)
https://github.com/Kuzma30/FREECAD_CNC my project. File where I have problem is "ПроставкаY.FCStd". File with tables is "ТаблицаПараметров.FCStd".
OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.20.30870 (Git)
Build type: Release
Branch: LinkDaily
Hash: ed30f75cf752508a3c544b907b036118f07d65b9
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.6.0
Locale: Ukrainian/Ukraine (uk_UA)
RealThunder's A3 Wiki translation, join the project https://crowdin.com/project/freecad-asm3-wiki
- Shalmeneser
- Veteran
- Posts: 9580
- Joined: Wed Dec 23, 2020 12:04 am
- Location: Fr
Re: PR#2862: Configuration Table using Spreadsheet
Can you provide a MWE (minimal working example) ?
Re: PR#2862: Configuration Table using Spreadsheet
In the process of creating an example, I came to understand what I was doing wrong.
I provide example files
I provide example files
- Attachments
-
- test2.FCStd
- (4.52 KiB) Downloaded 113 times
-
- test.FCStd
- (5.22 KiB) Downloaded 130 times
RealThunder's A3 Wiki translation, join the project https://crowdin.com/project/freecad-asm3-wiki
Re: PR#2862: Configuration Table using Spreadsheet
Another questions. Is it possible to add more that one configuration table to Body? For example one configuration table for external length, second table for holes in part, third table for pad size.
RealThunder's A3 Wiki translation, join the project https://crowdin.com/project/freecad-asm3-wiki
-
- Veteran
- Posts: 2190
- Joined: Tue Jan 03, 2017 10:55 am
Re: PR#2862: Configuration Table using Spreadsheet
So you've solved the problem yourself right? I tried your file and it seems fine.
Sure it's possible. When you create the table, just select a new property for configuration.
Re: PR#2862: Configuration Table using Spreadsheet
Test file for realthunder.
- Attachments
-
- test5.FCStd
- (36.01 KiB) Downloaded 115 times
RealThunder's A3 Wiki translation, join the project https://crowdin.com/project/freecad-asm3-wiki
-
- Veteran
- Posts: 2190
- Joined: Tue Jan 03, 2017 10:55 am
Re: PR#2862: Configuration Table using Spreadsheet
If you can make sure those secondary tables having the same number of configurations, then you can drive those tables with the first main table.
Type the following commands in Python console
By right, you can do this through property editor, by right clicking the 'Configuration' and choose 'Expression...', but there is a bug causing crash if you set expression on enumeration property. Oops!
Type the following commands in Python console
Code: Select all
App.ActiveDocument.Pocket.setExpression('Configuration', 'hiddenref(Body.configuration.Value)')
App.ActiveDocument.LinearPattern.setExpression('Configuration', 'hiddenref(Body.configuration.Value)')
Re: PR#2862: Configuration Table using Spreadsheet
Just a brief note that the final few commits of this PR have now been merged and will be part of the 0.20 release -- thanks again to @realthunder and to all the testers for helping get this reviewed and merged.
Re: PR#2862: Configuration Table using Spreadsheet
awesome!
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: PR#2862: Configuration Table using Spreadsheet
How should one make a copy of a parametric gear that uses a configuration table? I see the videos hurriedly click though something about elements but I'm not sure that applies to me, however I can't tell what menus they are in so I'm not sure. Lots of Youtube videos explain how to make one, no more.
I have a table of parameters for dozens of gears. I want to add 12 of those gears to my design. So I made one, typed in links to all the parameters and copied it. That worked, but it made an independent table that doesn't update with changes to the original table.
I tried copying just the gear and having multiple gears use the same table. That didn't work at all.
I tried copying the gear and spreadsheet and then binding the new spreadsheet to the original spreadsheet . That worked, but is it me or does that start to slow down FreeCAD? I also made the mistake of binding just the data I needed, then when I had to add a column I had to go back and manually rebind every copy.
...Which is usually a hint that I'm doing things wrong, so is there a smarter way for me to do this? Thanks!
I have a table of parameters for dozens of gears. I want to add 12 of those gears to my design. So I made one, typed in links to all the parameters and copied it. That worked, but it made an independent table that doesn't update with changes to the original table.
I tried copying just the gear and having multiple gears use the same table. That didn't work at all.
I tried copying the gear and spreadsheet and then binding the new spreadsheet to the original spreadsheet . That worked, but is it me or does that start to slow down FreeCAD? I also made the mistake of binding just the data I needed, then when I had to add a column I had to go back and manually rebind every copy.
...Which is usually a hint that I'm doing things wrong, so is there a smarter way for me to do this? Thanks!