[fcxref] External Cross-Document Reference & Links Manager

Info about new community or project announcements, implemented features, classes, modules or APIs. Might get technical!
PLEASE DO NOT POST HELP REQUESTS OR OTHER DISCUSSIONS HERE!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
gbroques
Posts: 167
Joined: Thu Jan 23, 2020 3:28 am
Location: St. Louis, Missouri

[fcxref] External Cross-Document Reference & Links Manager

Post by gbroques »

Announcing "fcxref" (FreeCAD external references), a project that aims to make managing "external" or "cross-document" references or "links" easier!

Please see the GitHub repository for more information:
https://github.com/gbroques/fcxref

MOTIVATION
I'm currently working on a FreeCAD project that involves a "Master" or "Main" spreadsheet and many documents (~65) that reference aliases in this spreadsheet.

It became increasingly difficult to know all the places where I was referencing aliases in the "Main" spreadsheet, and even more difficult to rename them.

To make this easier, I created "fcxref" (FreeCAD external references), a project that does this by parsing the Document.xml files in compressed .FCStd files.

I'm looking for feedback, testers, and to start a dialogue about changes or improvements.

Please post feedback in the corresponding Users Showcase post:
https://forum.freecadweb.org/viewtopic.php?f=24&t=60733

YouTube Demo
https://www.youtube.com/watch?v=Ng3kLWpiIT4
Last edited by gbroques on Mon Aug 02, 2021 1:10 am, edited 1 time in total.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: [fcxref] External Cross-Document Reference & Links Manager

Post by Kunda1 »

realthunder wrote:heads up
CC @realthunder
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
User avatar
gbroques
Posts: 167
Joined: Thu Jan 23, 2020 3:28 am
Location: St. Louis, Missouri

Re: [fcxref] External Cross-Document Reference & Links Manager

Post by gbroques »

Kunda1 wrote: Sun Aug 01, 2021 7:32 pm
realthunder wrote:heads up
CC @realthunder
I don't think this project impacts realthunder directly.

Of course his changes to FreeCAD may break my code. :)

I can certainly see him implementing similar functionality in FreeCAD core that makes this project obsolete.

Does anyone know if his FreeCAD fork has this functionality already, or if anyone has definite plans to work on this?
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: [fcxref] External Cross-Document Reference & Links Manager

Post by Kunda1 »

@gbroques can you provide a demo or a screencast of this feature in action?
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
User avatar
gbroques
Posts: 167
Joined: Thu Jan 23, 2020 3:28 am
Location: St. Louis, Missouri

Re: [fcxref] External Cross-Document Reference & Links Manager

Post by gbroques »

Kunda1 wrote: Sun Aug 01, 2021 10:09 pm @gbroques can you provide a demo or a screencast of this feature in action?
Sure, I uploaded a quick demo to YouTube:
https://www.youtube.com/watch?v=Ng3kLWpiIT4
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: [fcxref] External Cross-Document Reference & Links Manager

Post by realthunder »

There is a feature already in upstream, but I am not sure if this can achieve the same thing you want. Right click any item in the tree view, and select 'Expression actions -> copy all documents'. Open any text editor and paste to get all expressions in all documents in a readable format. You can add/remove/modify expressions, change binding property, change alias, etc. Just copy the modified code and use 'Expression actions -> Paste'.

I added this for easy access to all expressions in one go. also because expression in my branch can be a full program. See an example here. It would be better to have a dedicated editor with expression completer for that, in the future maybe.
Try Assembly3 with my custom build of FreeCAD at here.
And if you'd like to show your support, you can donate through patreon, liberapay, or paypal
User avatar
gbroques
Posts: 167
Joined: Thu Jan 23, 2020 3:28 am
Location: St. Louis, Missouri

Re: [fcxref] External Cross-Document Reference & Links Manager

Post by gbroques »

realthunder wrote: Mon Aug 02, 2021 8:33 am There is a feature already in upstream, but I am not sure if this can achieve the same thing you want. Right click any item in the tree view, and select 'Expression actions -> copy all documents'. Open any text editor and paste to get all expressions in all documents in a readable format. You can add/remove/modify expressions, change binding property, change alias, etc. Just copy the modified code and use 'Expression actions -> Paste'.

I added this for easy access to all expressions in one go. also because expression in my branch can be a full program. See an example here. It would be better to have a dedicated editor with expression completer for that, in the future maybe.
It's a definite step in the right direction and certainly helps! Thanks for chiming in on this. :D

By "upstream", do you mean your fork and or is there plans to contribute this feature back to FreeCAD?

I was wondering if there's a PR or something I could maybe track.

I've had my eye on Configuration Table using Spreadsheet #2862 with eager anticipation.
kisolre
Veteran
Posts: 4159
Joined: Wed Nov 21, 2018 1:13 pm

Re: [fcxref] External Cross-Document Reference & Links Manager

Post by kisolre »

gbroques wrote: Mon Aug 02, 2021 12:42 pm By "upstream",
"Upstream" is the main FreeCAD. Just checked and it is there in 25367 (local build form today), not sure since when.
User avatar
adrianinsaval
Veteran
Posts: 5534
Joined: Thu Apr 05, 2018 5:15 pm

Re: [fcxref] External Cross-Document Reference & Links Manager

Post by adrianinsaval »

I think it's been there for a long time, maybe even since Links were added. It's also in the stable 0.19 release
User avatar
gbroques
Posts: 167
Joined: Thu Jan 23, 2020 3:28 am
Location: St. Louis, Missouri

Re: [fcxref] External Cross-Document Reference & Links Manager

Post by gbroques »

adrianinsaval wrote: Mon Aug 02, 2021 2:59 pm "Upstream" is the main FreeCAD. Just checked and it is there in 25367 (local build form today), not sure since when.
I think it's been there for a long time, maybe even since Links were added. It's also in the stable 0.19 release
Thanks! I didn't read the page realthunder linked to closely enough and failed to realize you had to right-click the Spreadsheet object to see Expression Actions.

I had no idea this functionality existed until now, so I appreciate you two pointing it out to me.
Post Reply