I am working on some functionality that will link FreeCAD with a document database that is much more structured and controlled that a bunch of folders.
I was hoping that there might be a way to hijack and replace the global file browser dialog in FreeCAD. I imagine that this would be some where in the QT stuff.
Right now I launch FreeCAD calling an external macro at start when starting FreeCAD.
freecad ./myPython3code.py
Would much prefer not to have to mess around and build FreeCAD from scratch.
Best to first introduce your own file browser. Once that will be working, worry about the rest. Like hiding things you don’t want people to use, and instead expose the ones you do want the people to use.
P.S. A lot of new developers are too much focused on details, better to do the other 90% first.
I was hoping that some one might be able to make a little example with a hard coded file path return value. If I had that I think the rest would be pretty easy for me to work out.
I figured the hard part would be replacing the dialogs in the program, not the catching of files on a server to a temp directory and pushing them back to server.
As to the API to be used for communicating with the server. I have a system that manages rev controlled CAD data. Looks like there will be some work on it to make it handle FreeCAD files but I don’t expect that to be an issue. I think that having an example of how to override this dialog would be beneficial to any one who is trying to set up FreeCAD in a more structured environment.
I have $75 I am willing to spend for a short example with the following.
Replace hijack and replace all file dialogs in free cad.
A textbox with the file location.
A list box that can be populated from some kind of an array. Selecting an item sets the file name in the text box. List can be hard coded for example.
An ok button that can call a function that shows a msgbox with the file name followed by the default behavior for opening or selecting the file.