Ticket #4003 - Spreadsheet rename fails in v0.18

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!
grog
Posts: 1
Joined: Fri Jun 07, 2019 4:29 am

Ticket #4003 - Spreadsheet rename fails in v0.18

Postby grog » Fri Jun 07, 2019 4:33 am

Summary: Renaming spreadsheet no longer has any affect on field tags.
Description:
I have one computer with v0.17 and I can reliably change the Spreadsheet.
Typically I rename it to 'S' for less typing. On my other computer which I just
upgraded to v0.18 I can no longer reference tags by my typical S.tagname. I
have to state Spreadsheet.tagname. Can someone test and verify this issue for me?

Steps to Reproduce:
* new file
* Select Spreadsheet workbench and click on the spreadsheet icon to create a new
spreadsheet.
* Select spreadsheet on navigation window.
* type: F2 - S (To rename the spreadsheet to 'S')
* enter a number in a cell
* [CTRL][SHIFT]a - <cell tag name>
* now switch to Part workbench
* create a primitave part
* select one of it's dimensions,
* click on the calculation icon, and enter S.tagname. (This fails in v0.18 but
works in v0.17)
* now try Spreadsheet.tagname (This works)

Thanks for an awesome program.
GROG
Last edited by Kunda1 on Mon Jun 10, 2019 11:55 am, edited 1 time in total.
Reason: Added ticket number to thread title
kisolre
Posts: 2253
Joined: Wed Nov 21, 2018 1:13 pm

Re: Spreadsheet rename fails in v0.18

Postby kisolre » Fri Jun 07, 2019 5:59 am

"S" might be reserved for something ?!? Tried with "Q" and it works. "A" fails but "B" also works. did not try the whole alphabet but there might be some single letter labels used differently.
UR_
Posts: 1188
Joined: Tue Jan 03, 2017 8:42 pm

Re: Spreadsheet rename fails in v0.18

Postby UR_ » Fri Jun 07, 2019 7:33 am

"A" stands for ampere and is recognized by expression parser.
You can use predefined units if embedding into <<unit>>

Annotation 2019-06-07 092501.png
Annotation 2019-06-07 092501.png (7.23 KiB) Viewed 196 times
please see here too:
https://forum.freecadweb.org/viewtopic. ... er#p271452
User avatar
Kunda1
Posts: 7512
Joined: Thu Jan 05, 2017 9:03 pm

Re: Spreadsheet rename fails in v0.18

Postby Kunda1 » Mon Jun 10, 2019 11:54 am

bump, is there anything we want to do here? Is this the standard we want to keep?
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
openBrain
Posts: 4207
Joined: Fri Nov 09, 2018 5:38 pm

Re: Spreadsheet rename fails in v0.18

Postby openBrain » Mon Jun 10, 2019 1:02 pm

Kunda1 wrote:
Mon Jun 10, 2019 11:54 am
bump, is there anything we want to do here? Is this the standard we want to keep?
IMHO there are 2 solutions to improve :
  • Change way that referers are called so they never collide with units (or other reserved words). Eg. prefix with a '#' (if your spreadsheet is named 'ssheet', you will call it in expressions with '#ssheet.A1') => I don't like it much as it will break compatibility with former FC documents (despite it's maybe possible to automate the conversion)
  • Maintain in FC code a list of reserved keywords and prevent the user to use them as label. Eg. if you try to label a spreadsheet with 'A', FC will return an error saying its not allowed. => I'd prefer this one for compatibility, but it's however a tough coding effort I guess.
My 2 cents.