Not really sure what you want, but if you can do it with some toolbar button, then you can always copy the command output from the Python console for coding.Zolko wrote: ↑Sat Jan 18, 2020 10:00 pm And while we're at it, is there a Python command/script that allows to open/activate a document that is already open in the background ? Something equivalent to right-click > Activate Document > ... or right-click > Link actions > Go to linked object ? Or, alternatively, bring that function Link actions > Go to linked object to the first right-click level, something like, when right-click on an App::Link object, Go to Document and that opens the corresponding document ?
PR#2862: Configuration Table using Spreadsheet
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
-
- Veteran
- Posts: 2190
- Joined: Tue Jan 03, 2017 10:55 am
Re: PR#2862: Configuration Table using Spreadsheet
Re: PR#2862: Configuration Table using Spreadsheet
I'm a little disappointed: you should know that of course I did try that, and if I ask it's because that doesn't work. It says:realthunder wrote: ↑Sat Jan 18, 2020 10:57 pm Not really sure what you want, but if you can do it with some toolbar button, then you can always copy the command output from the Python console for coding.
Code: Select all
Gui.runCommand('Std_LinkSelectLinked',0)
Please
-
- Veteran
- Posts: 2190
- Joined: Tue Jan 03, 2017 10:55 am
Re: PR#2862: Configuration Table using Spreadsheet
This function is already there. You'll just have to enable tree view option 'Sync View', which will auto switch to the hidden view of the linked document.Zolko wrote: ↑Sat Jan 18, 2020 11:32 pm What I wish is simple: that the right-click action on an App::Link, in the contextual menu, in the sub-menu Link actions > go to linked object gets into the first level of the contextual menu, with the text Open document. In other words, if the user right-clicks on an App::Link, appears somewhere in the pop-up menu the command : Open document which activates the open but hidden document of the linked part.
If you are asking how to do it yourself, here is the code.
Code: Select all
# Assuming there is a App::Link in the active document named 'Link'
linked = App.ActiveDocument.Link.LinkedObject
# in case linking to a sub-object
if isinstance(linked, tuple):
linked = linked[0].getSubObject(linked[1], retType=1)
App.setActiveDocument(linked.Document.Name)
Gui.activateView('Gui::View3DInventor', True)
Re: PR#2862: Configuration Table using Spreadsheet
yes, that did it, thank-you.realthunder wrote: ↑Sat Jan 18, 2020 11:57 pm If you are asking how to do it yourself, here is the code.
EDIT: this is awesome, I've been wanting this function for ages !
Re: PR#2862: Configuration Table using Spreadsheet
Hi,
I wanted to try configuration table using spreadsheet.
But can't get it to work. I've attached the file.
When I add App::PropertyEnumeration the Enum box doesn't appear, so I can't fill it in.
Any advice.
Many thanks
Huba
I wanted to try configuration table using spreadsheet.
But can't get it to work. I've attached the file.
When I add App::PropertyEnumeration the Enum box doesn't appear, so I can't fill it in.
Any advice.
Many thanks
Huba
-
- Veteran
- Posts: 2190
- Joined: Tue Jan 03, 2017 10:55 am
Re: PR#2862: Configuration Table using Spreadsheet
This PR has not been merged yet. Are you trying my branch? I have just update the branch to rebase with the latest upstream. You can try again.
Re: PR#2862: Configuration Table using Spreadsheet
Thanks for the reply. I tough it was merged. I must have misread it.realthunder wrote: ↑Wed Apr 15, 2020 5:05 amThis PR has not been merged yet. Are you trying my branch? I have just update the branch to rebase with the latest upstream. You can try again.
I compiled it and it seems to work.
I'm going to play around with it now.
Re: PR#2862: Configuration Table using Spreadsheet
The compiled version was messing up pasting the values. But 0.11 app-image works.
Awesome.
Many thanks for your work. Long awaited feature.
Awesome.
Many thanks for your work. Long awaited feature.
Re: PR#2862: Configuration Table using Spreadsheet
Hello realthunder, I have a really desirable usecase for architectural workflow, and I'd really like to understand if it is something feasible using configuration table.
Reference to this simple parametric window:
It's an App::Part that uses an App::FeaturePython object ("Variables") to set "configuration values" in the Assembly4 style.
The Window can be linked into an arch model and added to a wall (the one that you kindly helped me to experiment). The wall gets so the WallVoid shape for the boolean cut of the window opening.
Height, Width and WallWidth have to be customizable for every window instance (and expecially WallWidth have to be adapted to the host wall).
So I'd like to Link that window Part and be able to change those values on demand.
We do not want to preserve the object hierarchy, we just need the 2 shapes: the window and the wall void.
Do you think it could be something feasible, considering that the WallWidth property have to be adjusted always on the fly when we know the width of the hosting wall?
Thanks in advance
follow my experiments on BIM modelling for architecture design
-
- Veteran
- Posts: 2190
- Joined: Tue Jan 03, 2017 10:55 am
Re: PR#2862: Configuration Table using Spreadsheet
Yes, it is possible. I just tried it. Since you don't need the object hierarchy, you should use SubShapeBinder. However, I just discovered that SubShapeBinder will lose shape color if binding to external object. I'll fix that first.