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

Ticket #4003 - Spreadsheet rename fails in v0.18

Post by grog »

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
Veteran
Posts: 4166
Joined: Wed Nov 21, 2018 1:13 pm

Re: Spreadsheet rename fails in v0.18

Post by kisolre »

"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_
Veteran
Posts: 1355
Joined: Tue Jan 03, 2017 8:42 pm

Re: Spreadsheet rename fails in v0.18

Post by UR_ »

"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 1016 times
please see here too:
https://forum.freecadweb.org/viewtopic. ... er#p271452
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Spreadsheet rename fails in v0.18

Post by Kunda1 »

bump, is there anything we want to do here? Is this the standard we want to keep?
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
openBrain
Veteran
Posts: 9041
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: Spreadsheet rename fails in v0.18

Post by openBrain »

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.
Post Reply