DynamicData and spreadsheets

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
Post Reply
drmacro
Veteran
Posts: 9009
Joined: Sun Mar 02, 2014 4:35 pm

DynamicData and spreadsheets

Post by drmacro »

Some questions on importing dd objects from a spreadsheet.

During import the Report view displays a message about resetting the spreadsheet alias to point to the dd object.

This defined behaviour, understood. But, if there is an expression in a cell, the current result of the expression is added as a dd value and the expression is lost, again defined behaviour.

I also see that the spreadsheet cell can be changed to have a different expression after it has been copied to a dd object (I assume doing so means the dd object and spreadsheet cell no longer have any connection, other than the concatenated/capitalized dd object name) and the dd object can be updated to to an expression as well.

The docs have a caveat-emptor for the initial copy operation as does the warning during the import, so no problem. What I'm missing is the use case for copying the from the spreadsheet (especially with the expressions being lost). :?:
TheMarkster wrote: pinged by pinger macro
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
TheMarkster
Veteran
Posts: 5513
Joined: Thu Apr 05, 2018 1:53 am

Re: DynamicData and spreadsheets

Post by TheMarkster »

If you would prefer to use a dd object instead of the spreadsheet that you already built this can automate that process, at least to a degree. You will need to fix any expressions that were lost, but at least it gives you a headstart. In the case where you haven't used expressions, but merely have constant values in the spreadsheet, the automation is complete. (But you still need to retain the spreadsheet because your sketches and other references are all still pointing to the spreadsheet unless you change them).

The workbench is in need of an overhaul. I have some ideas for managing expressions better, but I don't want to make any promises on that. I would like to also relax the naming convention of dd+CamelCase, but it so integrated into the code it's not a simple change to make.
drmacro
Veteran
Posts: 9009
Joined: Sun Mar 02, 2014 4:35 pm

Re: DynamicData and spreadsheets

Post by drmacro »

Ok, thanks for the info. :)
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
Post Reply