[Solved] Linked Object File/Path

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
leoheck
Veteran
Posts: 1222
Joined: Tue Mar 13, 2018 5:56 pm
Location: Coffee shop

[Solved] Linked Object File/Path

Post by leoheck »

How do I get the file/path of a Linked Object?
Last edited by leoheck on Tue Oct 04, 2022 4:19 pm, edited 1 time in total.
Bance
Veteran
Posts: 4186
Joined: Wed Feb 11, 2015 3:00 pm
Location: London

Re: Linked Object File/Path

Post by Bance »

In a terminal do :-

readlink -f (filename)
leoheck
Veteran
Posts: 1222
Joined: Tue Mar 13, 2018 5:56 pm
Location: Coffee shop

Re: Linked Object File/Path

Post by leoheck »

hahahaha

Is this Freecad Forum, right?

I am asking if there is a way to get the File Path, of a File, that is being Linked, in the "Linked Object" property on an Object of the "App::Link" type.
leoheck
Veteran
Posts: 1222
Joined: Tue Mar 13, 2018 5:56 pm
Location: Coffee shop

Re: Linked Object File/Path

Post by leoheck »

I could find the answer to my own question.

Code: Select all

filepath = obj.getLinkedObject().Document.FileName
Since I could solve my issue I could make this
https://gist.github.com/leoheck/0933ca6 ... 0e2a4f811b

It lists linked files if you need to find all files related to the current one.
And it also shows the files in a tree.
Post Reply