View Issue Details

IDProjectCategoryView StatusLast Update
0002442FreeCADBugpublic2016-02-18 16:39
Reporteryoan Assigned Toeivindkvedalen  
Status closedResolutionfixed 
PlatformLinuxOSLinux Mint 17 Qiana 
Fixed in Version0.16 
Summary0002442: FreeCAD 0.16: Expressions accross files are not saved
DescriptionExpressions accross files other_file#Some_Part are saved as this_file#Some_Part when reopening the saved document.
Steps To ReproduceOpen FreeCAD
New document
Select the "Part" workbench
Draw a cube
Save under cube.FCStd

New document
Select the "Part" workbench
Draw a cylinder
Set Cylinder.Radius to function cube#Cube.Height
The cylinder has now a radius of 10mm (default height of a cube)
Save under cylinder.FCStd

Close FreeCAD
Open FreeCAD
Open cylinder.FCStd

Checkout the value of Cylinder.Radius, it's now cylinder#Cube.Height instead of cube#Cube.Height
Additional InformationOS: Linux Mint 17 Qiana
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.6395 (Git)
Build type: None
Branch: master
Hash: 1324575b3548d6730789baa453ad71fee35abe04
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
TagsNo tags attached.
FreeCAD Information



2016-02-10 22:03

reporter   ~0006821

Looks like it is properly saved but not restored, this line in ObjectIdentifier::resolve() overwrites the file reference provided by the file:

documentName = String(doc->getName(), false, documentName.isForceIdentifier());

Although I don't get how these force identifiers work (ObjectIdentifier::documentObjectNameSet and ObjectIdentifier::String::forceIdentifier, aren't they the same parameters?) commenting this results in another uncaught exception so it seems more complex :)


2016-02-10 23:32

developer   ~0006823

Please try the branch at , and see if it solves your problem.


2016-02-11 01:42

reporter   ~0006824

Yes it works, thanks!

Also when file_1 is opened and refers to file_2 that is not currently opened, any attempt to use a value file2#object.Property should raise "File file2 not opened" instead of Property not found.

Related Changesets

FreeCAD: master be671259

2016-02-12 22:13:58

Eivind Kvedalen

Committer: wmayer Details Diff
PropertExpressionEngine: Ignore dependencies that does not resolve to a document when verifying expressions. Affected Issues
mod - src/App/PropertyExpressionEngine.cpp Diff File

FreeCAD: master 1da5d339

2016-02-12 22:24:41

Eivind Kvedalen

Committer: wmayer Details Diff
Expression class: Improved error message when resolving a variable fails. Affected Issues
mod - src/App/Expression.cpp Diff File
mod - src/App/ObjectIdentifier.cpp Diff File
mod - src/App/ObjectIdentifier.h Diff File

Issue History

Date Modified Username Field Change
2016-02-07 20:44 yoan New Issue
2016-02-08 20:27 eivindkvedalen Assigned To => eivindkvedalen
2016-02-08 20:27 eivindkvedalen Status new => assigned
2016-02-10 22:03 yoan Note Added: 0006821
2016-02-10 23:32 eivindkvedalen Note Added: 0006823
2016-02-11 01:42 yoan Note Added: 0006824
2016-02-18 16:39 wmayer Changeset attached => FreeCAD Master master be671259
2016-02-18 16:39 wmayer Changeset attached => FreeCAD Master master 1da5d339
2016-02-18 16:39 wmayer Status assigned => closed
2016-02-18 16:39 wmayer Resolution open => fixed
2016-02-18 16:39 wmayer Fixed in Version => 0.16