If the Draft WB has not been loaded and you double-click on a Draft Wire the following error is reported: 16:29:54 Traceback (most recent call last):
File "D:\BKG_Tmp\FreeCAD_0.20_Last\Mod\Draft\draftviewproviders\view_base.py", line 392, in setEdit
Gui.runCommand("Draft_Edit")
<class 'Base.FreeCADError'>: No such command 'Draft_Edit'
I think something has changed from previous FC versions. I find current behaviour correct: if Draft WB is not loaded, then the command should not be activated.
I propose to add a warning message to tell the user he has to activate Draft. https://github.com/carlopav/FreeCAD/com ... 11a2673183
follow my experiments on BIM modelling for architecture design
carlopav wrote: ↑Sat Jun 05, 2021 3:40 pm
if Draft WB is not loaded, then the command should not be activated
Although this does makes sense it is not consistent.
If you double-click a Part_Box when the Part WB has not been loaded there is no such message and the appropriate task panel opens.
If you double-click an Arch_Window the BIM WB is loaded (maybe if BIM is not installed the Arch WB is loaded instead?) and again the appropriate task panel opens.
hmmm I do not think those objects are supposed to launch a command of a specific workbench when setEdit() is executed, but just open a task panel (that for Arch is defined and pointed directly from the object)... maybe there could be a difference because of that?
follow my experiments on BIM modelling for architecture design
carlopav wrote: ↑Sat Jun 05, 2021 3:40 pm
if Draft WB is not loaded, then the command should not be activated
Although this does makes sense it is not consistent.
If you double-click a Part_Box when the Part WB has not been loaded there is no such message and the appropriate task panel opens.
If you double-click an Arch_Window the BIM WB is loaded (maybe if BIM is not installed the Arch WB is loaded instead?) and again the appropriate task panel opens.
carlopav wrote: ↑Sun Jun 20, 2021 7:50 am
if it's ok for you you could make the change and create a PR
Credit where credit is due, I'll leave this one in your capable hands! But don't worry: It is certainly my intention to try to address some of the other bugs I have reported.