App::Link modifies linked file

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
Grawp
Posts: 45
Joined: Sat Mar 03, 2018 9:34 am

App::Link modifies linked file

Post by Grawp »

Hello,
I've noticed that linking in things from other files modifies those files and I'd like to ask why.
This does not play well with VCS. Imagine you have a well drawn independent model in its final fixed version in file A and you link it to file B and now the A is modified even though your intent was to just use it.
Thanks
User avatar
M4x
Veteran
Posts: 1479
Joined: Sat Mar 11, 2017 9:23 am
Location: Germany

Re: App::Link modifies linked file

Post by M4x »

Could you share an example file? I'm not sure what's being modified while you're only trying to use it.
Grawp
Posts: 45
Joined: Sat Mar 03, 2018 9:34 am

Re: App::Link modifies linked file

Post by Grawp »

1. Here is a file which is supposed to be linked in an other file:
BlankTopPanel.FCStd
(29.96 KiB) Downloaded 19 times
2. I create a new file TopPanel.FCStd and link BlankTopPanel part from BlankTopPanel file into it.
3. Both files are immediately marked as modified.
Screenshot_20200614_125332.png
Screenshot_20200614_125332.png (5.06 KiB) Viewed 917 times
4. I save both files
Screenshot_20200614_125446.png
Screenshot_20200614_125446.png (27.22 KiB) Viewed 917 times
so you can you can compare what is actually modified in the BlankTopPanel file:
BlankTopPanel.FCStd
(29.87 KiB) Downloaded 18 times
TopPanel.FCStd
(2.64 KiB) Downloaded 17 times
I'm on
OS: Gentoo/Linux (KDE//usr/share/xsessions/plasma)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.21614 (Git)
Build type: Release
Branch: (HEAD detached at refs/git-r3/HEAD)
Hash: fc6a449fbae1fda767d52f414cb8c53424dff607
Python version: 3.7.7
Qt version: 5.14.2
Coin version: 4.0.0
OCC version: 7.4.0
Locale: English/United States (en_US)
User avatar
M4x
Veteran
Posts: 1479
Joined: Sat Mar 11, 2017 9:23 am
Location: Germany

Re: App::Link modifies linked file

Post by M4x »

Ah, I've recognized that too. To be honest, I've just started to use App:Link. But besides the "file has been modified-mark", nothing changed, right?
Grawp
Posts: 45
Joined: Sat Mar 03, 2018 9:34 am

Re: App::Link modifies linked file

Post by Grawp »

Well, some things certainly have changed. You can diff the .xml files. I do not know if those changes are important and whether I can revert them in VCS.
User avatar
M4x
Veteran
Posts: 1479
Joined: Sat Mar 11, 2017 9:23 am
Location: Germany

Re: App::Link modifies linked file

Post by M4x »

Could it be that only the timestamp gets an update? When opening an assembly file with links in it, the report view reports something like this:

Code: Select all

<App> Document.cpp(2817): ASSEMBLY-FILENAME#Link.LinkedObject: Time stamp changed on link LINK-SOURCE-FILENAME#Body012
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: App::Link modifies linked file

Post by Zolko »

M4x wrote: Tue Jun 16, 2020 8:16 pm Could it be that only the timestamp gets an update?
yes, I think so
try the Assembly4 workbench for FreCAD — tutorials here and here
Grawp
Posts: 45
Joined: Sat Mar 03, 2018 9:34 am

Re: App::Link modifies linked file

Post by Grawp »

Actually many things are changed. You can see them if you compare those attached files.
Screenshot_20200703_124704.png
Screenshot_20200703_124704.png (425.37 KiB) Viewed 764 times
Post Reply