View Issue Details

IDProjectCategoryView StatusLast Update
0003271ExpressionsGeneralpublic2020-03-22 17:36
Reporterbgoodr Assigned Torealthunder  
Status closedResolutionfixed 
Product Version0.17 
Summary0003271: Relative file references give 'Document not found' unless that file is opened first
DescriptionVersion info:

OS: Ubuntu 17.04
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.12643 (Git)
Build type: None
Branch: master
Hash: 868d9cc6c215ce3a2ab20d454378ec00e1b9ed26
Python version: 2.7.13
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: English/UnitedStates (en_US)

Apparently, spreadsheets have to be opened before they can be used. Not sure if it is due to their being relative file paths, but it should not matter. If I reference an alias in a spreadsheet from the value of a constraint in a sketch, the application should know how to read that alias value and use it, and not say "document not found".

A full GIF of the error is shown in the attached screencapture-gif-0012.gif file (also includes another issue with failing to parse an error that I will file a separate bug after I finish filing this one).
EDIT: See 0003272
Steps To Reproduce
  1. Extract the tarball.
  2. cd into the directory that is extracted so that the current working directory can resolve paths to other files in the set of files.
  3. Open up the file: freecad-daily UpsideDownMonitorMount.fcstd
  4. Open up the Leg.fcstd file using the button.
  5. Double click on the sketcher
  6. Double click on the constraint with 1.5yd ("Shelf Depth")
  7. Click on the fx button.
  8. Type in a reference to the alias that is in the spreadsheet: MasterSpreadsheet#Spreadsheet.Sd
  9. Notice it says Result: Document not found: MasterSpreadsheet
  10. That is incorrect. It should be found as it resides in the current working directory from which I invoked. Even if it was a fully-qualified/absolute file path, it should still resolve the spreadsheet, and not require me to open it.
Tagsexpressions, sketcher, spreadsheet
FreeCAD Information


related to 0002477 assignedrealthunder Copy of sub objects with expression pointing to a spreadsheet shall not create a new spreadsheet 
related to 0003272 new Failed to parse expression occurs when referencing an alias in an external spreadsheet document 



2017-11-27 01:15


screencapture-gif-0012.gif (1,365,356 bytes)   
screencapture-gif-0012.gif (1,365,356 bytes)   


2017-11-27 01:17

reporter   ~0010476

Last edited: 2017-11-27 01:17

There is some precedence for this already. See


2017-11-27 02:58

administrator   ~0010477

@eivindkvedalen care to weigh in ?


2017-12-09 12:22

administrator   ~0010553

Forum thread:


2017-12-09 12:44

administrator   ~0010557

Last edited: 2017-12-09 12:45

Changed from bug -> feature

At this point, FreeCAD can't fetch a value from a project file, AFAIK. It has to be open in same FC session.

I would consider this a feature request rather than a bug.



2020-02-27 06:06

developer   ~0014188

With this commit in upstream, the expression (PropertyExpressionEngine/PropertySheet to be exactly) gained the ability to automatically load the linked external document. For existing document authored in previous version of FreeCAD, manually load all the files in newer version FreeCAD, and save all of them to enable auto loading.


2020-03-22 17:22

administrator   ~0014257

FreeCAD master 93e60caa


2020-03-22 17:36

administrator   ~0014258

Fixed and closed. Thanks realthunder!

Related Changesets

FreeCAD: master 93e60caa

2019-06-29 09:30:51

Zheng, Lei

Committer: wmayer Details Diff
PropertyExpressionEngine: convert to link type property

PropertyExpressionEngine is changed to derived from a new class
PropertyExpressionContainer, which is in turn derives from
PropertyXLinkContainer. This makes PropertyExpressionEngine a link type
property that is capable of external linking. It now uses the unified
link property APIs for dependency management and tracking of object
life time, re-labeling, etc.

ObjectIdentifier is modified to support sub-object reference, but is
not exposed to end-user, because expression syntax is kept mostly
unchanged, which will be submitted in future PR. There is, however,
one small change in expression syntax (ExpressionParser.y) to introduce
local property reference to avoid ambiguity mentioned in

Modified Expression/ExpressionModifier interface to support various link
property API for link modification.
Affected Issues
mod - src/App/Application.cpp Diff File
mod - src/App/Document.cpp Diff File
mod - src/App/DocumentObject.cpp Diff File
mod - src/App/DocumentObject.h Diff File
mod - src/App/DocumentObjectPy.xml Diff File
mod - src/App/DocumentObjectPyImp.cpp Diff File
mod - src/App/Expression.cpp Diff File
mod - src/App/Expression.h Diff File
mod - src/App/ Diff File
mod - src/App/ExpressionParser.y Diff File
mod - src/App/ExpressionVisitors.h Diff File
mod - src/App/ObjectIdentifier.cpp Diff File
mod - src/App/ObjectIdentifier.h Diff File
mod - src/App/Property.h Diff File
mod - src/App/PropertyExpressionEngine.cpp Diff File
mod - src/App/PropertyExpressionEngine.h Diff File
mod - src/App/PropertyGeo.cpp Diff File
mod - src/App/PropertyGeo.h Diff File
mod - src/App/PropertyUnits.cpp Diff File
mod - src/App/Range.cpp Diff File
mod - src/App/Range.h Diff File
mod - src/Mod/Sketcher/App/PropertyConstraintList.cpp Diff File
mod - src/Mod/Sketcher/App/PropertyConstraintList.h Diff File
mod - src/Mod/Sketcher/App/SketchObject.cpp Diff File
mod - src/Mod/Sketcher/App/SketchObject.h Diff File

Issue History

Date Modified Username Field Change
2017-11-27 01:15 bgoodr New Issue
2017-11-27 01:15 bgoodr File Added: UpsideDownMonitorMount.tar.gz
2017-11-27 01:15 bgoodr File Added: screencapture-gif-0012.gif
2017-11-27 01:15 bgoodr Tag Attached: expressions
2017-11-27 01:15 bgoodr Tag Attached: sketcher
2017-11-27 01:15 bgoodr Tag Attached: spreadsheet
2017-11-27 01:17 bgoodr Note Added: 0010476
2017-11-27 01:17 bgoodr Note Edited: 0010476
2017-11-27 02:58 Kunda1 Note Added: 0010477
2017-11-27 03:00 Kunda1 Relationship added related to 0003272
2017-11-27 03:01 Kunda1 Description Updated
2017-12-09 12:22 Kunda1 Note Added: 0010553
2017-12-09 12:44 Kunda1 Category Bug => Feature
2017-12-09 12:44 Kunda1 Note Added: 0010557
2017-12-09 12:44 Kunda1 Summary Relative file references give Document not found unless that file is opened first => Relative file references give 'Document not found' unless that file is opened first
2017-12-09 12:45 Kunda1 Note Edited: 0010557
2017-12-09 12:55 Kunda1 Relationship added related to 0002477
2017-12-13 15:27 Kunda1 Project Sketcher => Expressions
2017-12-13 15:27 Kunda1 Category Feature => General
2020-02-27 06:06 realthunder Note Added: 0014188
2020-02-27 18:10 Kunda1 Assigned To => realthunder
2020-02-27 18:10 Kunda1 Status new => assigned
2020-03-22 17:22 Kunda1 Note Added: 0014257
2020-03-22 17:22 Kunda1 Changeset attached => FreeCAD master 93e60caa
2020-03-22 17:36 Kunda1 Status assigned => closed
2020-03-22 17:36 Kunda1 Resolution open => fixed
2020-03-22 17:36 Kunda1 Fixed in Version => 0.19
2020-03-22 17:36 Kunda1 Note Added: 0014258