Arch Axis tool on a new document

A forum dedicated to the Draft, Arch and BIM workbenches development.
User avatar
yorik
Site Admin
Posts: 11163
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: Arch Axis tool on a new document

Postby yorik » Wed Feb 10, 2016 9:11 pm

Thanks! There are two errors there. The first one is very strange:
bernd wrote: File "C:\Daten\FreeCAD_0.16.6397_x64_dev_bin\Mod\Arch\ArchAxis.py", line 141, in __init__
vobj.Proxy = self
Base.FreeCADError: Unknown C++ exception
99% of the python objects do that and there is never a problem... Just a small idea: Do you use a translated version of FreeCAD? Does the bug also happen when it is in english?

The second error:
bernd wrote:TypeError: Property 'Distances': type in list must be float, not int
Is solved since yesterday in current master.
User avatar
bitacovir
Posts: 600
Joined: Sat Apr 19, 2014 6:23 am
Contact:

Re: Arch Axis tool on a new document

Postby bitacovir » Thu Feb 11, 2016 11:38 am

yorik wrote:Thanks! There are two errors there. The first one is very strange:
bernd wrote: File "C:\Daten\FreeCAD_0.16.6397_x64_dev_bin\Mod\Arch\ArchAxis.py", line 141, in __init__
vobj.Proxy = self
Base.FreeCADError: Unknown C++ exception
99% of the python objects do that and there is never a problem... Just a small idea: Do you use a translated version of FreeCAD? Does the bug also happen when it is in english?
Sorry, I have not answered your questions guys before because I was busy and I am in Australia (12 hrs of differences with america).
About the version. Yes, this happen to me with a English version of FreeCAD.
Here my report view:

Code: Select all

Arch workbench activated
Running the Python command 'Arch_Axis' failed:
Traceback (most recent call last):
  File "C:\Users\bitacovir\Documents\Programs\FreeCAD_0.16.6408_x86_dev_bin\Mod\Arch\ArchAxis.py", line 75, in Activated
    FreeCADGui.doCommand("Arch.makeAxis()")
  File "<string>", line 1, in <module>
  File "C:\Users\bitacovir\Documents\Programs\FreeCAD_0.16.6408_x86_dev_bin\Mod\Arch\ArchAxis.py", line 46, in makeAxis
    _ViewProviderAxis(obj.ViewObject)
  File "C:\Users\bitacovir\Documents\Programs\FreeCAD_0.16.6408_x86_dev_bin\Mod\Arch\ArchAxis.py", line 141, in __init__
    vobj.Proxy = self

Unknown C++ exception
OS: Windows 7
Word size of OS: 32-bit
Word size of FreeCAD: 32-bit
Version: 0.16.6408 (Git)
Build type: Release
Branch: master
Hash: f942bf2729fe73998453830773cc936e8c4cb208
Python version: 2.7.8
Qt version: 4.8.6
Coin version: 4.0.0a
::bitacovir::
===================================
One must be absolutely modern.
Arthur Rimbaud (A Season in Hell -1873)

My Blog
Mini Airflow Tunnel Project
User avatar
bernd
Posts: 7745
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Arch Axis tool on a new document

Postby bernd » Thu Feb 11, 2016 11:42 am

bitacovir wrote: About the version. Yes, this happen to me with a English version of FreeCAD.
Yeah for me too. Hapens independent from languarge setting of FreeCAD GUI. The only one we have is that it is Windows only !
User avatar
sgrogan
Posts: 5075
Joined: Wed Oct 22, 2014 5:02 pm

Re: Arch Axis tool on a new document

Postby sgrogan » Thu Feb 11, 2016 1:03 pm

bernd wrote:
bitacovir wrote: About the version. Yes, this happen to me with a English version of FreeCAD.
Yeah for me too. Hapens independent from languarge setting of FreeCAD GUI. The only one we have is that it is Windows only !
Try to rename

Code: Select all

FreeCAD_0.16.6397_x64_dev_bin
to

Code: Select all

FreeCAD
Works for me

Code: Select all

Python 2.7.8 (default, Nov 17 2014, 20:37:05) [MSC v.1800 64 bit (AMD64)] on win32
Type 'help', 'copyright', 'credits' or 'license' for more information.
>>> Gui.activateWorkbench("ArchWorkbench")
>>> App.newDocument("Unnamed")
>>> App.setActiveDocument("Unnamed")
>>> App.ActiveDocument=App.getDocument("Unnamed")
>>> Gui.ActiveDocument=Gui.getDocument("Unnamed")
>>> import Arch
>>> Arch.makeAxis()
>>> Gui.SendMsgToActiveView("ViewFit")
OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.6409 (Git)
Build type: Release
Branch: master
Hash: 01032c952d8456be828820f287f275bcc68dd49f
Python version: 2.7.8
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17

Edit: It works with the full path also for me

Code: Select all

C:\Users\sim\Downloads\FreeCAD_0.16.6408_x64_dev_bin\bin
OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.6408 (Git)
Build type: Release
Branch: master
Hash: f942bf2729fe73998453830773cc936e8c4cb208
Python version: 2.7.8
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
User avatar
bitacovir
Posts: 600
Joined: Sat Apr 19, 2014 6:23 am
Contact:

Re: Arch Axis tool on a new document

Postby bitacovir » Thu Feb 11, 2016 11:48 pm

Hi. It does not work for me. I tested this in two computers and the result is similar.

Full name as FreeCAD_0.16.6408_x64_dev_bin:

Code: Select all

Arch workbench activated
Running the Python command 'Arch_Axis' failed:
Traceback (most recent call last):
  File "F:\Respaldos_SIAL_workstation\Programs\FreeCAD_0.16.6408_x64_dev_bin\Mod\Arch\ArchAxis.py", line 75, in Activated
    FreeCADGui.doCommand("Arch.makeAxis()")
  File "<string>", line 1, in <module>
  File "F:\Respaldos_SIAL_workstation\Programs\FreeCAD_0.16.6408_x64_dev_bin\Mod\Arch\ArchAxis.py", line 46, in makeAxis
    _ViewProviderAxis(obj.ViewObject)
  File "F:\Respaldos_SIAL_workstation\Programs\FreeCAD_0.16.6408_x64_dev_bin\Mod\Arch\ArchAxis.py", line 141, in __init__
    vobj.Proxy = self

Unknown C++ exception
Short name as FreeCAD:

Code: Select all

Arch workbench activated
Running the Python command 'Arch_Axis' failed:
Traceback (most recent call last):
  File "F:\Respaldos_SIAL_workstation\Programs\FreeCAD\Mod\Arch\ArchAxis.py", line 75, in Activated
    FreeCADGui.doCommand("Arch.makeAxis()")
  File "<string>", line 1, in <module>
  File "F:\Respaldos_SIAL_workstation\Programs\FreeCAD\Mod\Arch\ArchAxis.py", line 46, in makeAxis
    _ViewProviderAxis(obj.ViewObject)
  File "F:\Respaldos_SIAL_workstation\Programs\FreeCAD\Mod\Arch\ArchAxis.py", line 141, in __init__
    vobj.Proxy = self

Unknown C++ exception
OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.6408 (Git)
Build type: Release
Branch: master
Hash: f942bf2729fe73998453830773cc936e8c4cb208
Python version: 2.7.8
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
::bitacovir::
===================================
One must be absolutely modern.
Arthur Rimbaud (A Season in Hell -1873)

My Blog
Mini Airflow Tunnel Project
User avatar
sgrogan
Posts: 5075
Joined: Wed Oct 22, 2014 5:02 pm

Re: Arch Axis tool on a new document

Postby sgrogan » Fri Feb 12, 2016 1:55 am

Starting FreeCAD with the Start WB as default I can reproduce. If I close the start WB before switching to Arch WB the error does not occur.
bitacovir wrote:Hi. It does not work for me. I tested this in two computers and the result is similar.
@bitacovir
Start FreeCAD

Code: Select all

Close all open documents, for me "Start page"
New Document
Switch to Arch WB
Axis tool
Works

Code: Select all

Close all open documents, for me "Start page"
Switch to Arch WB
New Document
Axis tool
Fails:Report View

Code: Select all

Arch workbench activated
Running the Python command 'Arch_Axis' failed:
Traceback (most recent call last):
  File "C:\Users\Chris\GitHub\FCAutoBuild\var\build_x64_VC12\Mod\Arch\ArchAxis.py", line 75, in Activated
    FreeCADGui.doCommand("Arch.makeAxis()")
  File "<string>", line 1, in <module>
  File "C:\Users\Chris\GitHub\FCAutoBuild\var\build_x64_VC12\Mod\Arch\ArchAxis.py", line 46, in makeAxis
    _ViewProviderAxis(obj.ViewObject)
  File "C:\Users\Chris\GitHub\FCAutoBuild\var\build_x64_VC12\Mod\Arch\ArchAxis.py", line 141, in __init__
    vobj.Proxy = self

Unknown C++ exception
OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.6415 (Git)
Build type: Release
Branch: master
Hash: 6a103493a18e5f2b0fc942e46ae11419ac90e015
Python version: 2.7.8
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
User avatar
yorik
Site Admin
Posts: 11163
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: Arch Axis tool on a new document

Postby yorik » Fri Feb 12, 2016 2:21 am

this is very strange... setting "vobj.Proxy = self" is the most common operation.. All python features do that. Does the rest of the Arch and Draft objects work normally? Walls, draft lines, etc
User avatar
sgrogan
Posts: 5075
Joined: Wed Oct 22, 2014 5:02 pm

Re: Arch Axis tool on a new document

Postby sgrogan » Fri Feb 12, 2016 3:12 am

To be honest I do not know what "normally" is :?
I stumbled upon this by accident. I was changing preferences for the ifc struct stuff and checking random (sortof) commands.
I can test, but I don't know the workflow, or expected results. I have verified the order of New document and Arch WB activation. It is repeatable.
Boring report view for Creating New document before switching to the Arch WB

Code: Select all

Arch workbench activated
Report View after switching (for clarity)
User avatar
bitacovir
Posts: 600
Joined: Sat Apr 19, 2014 6:23 am
Contact:

Re: Arch Axis tool on a new document

Postby bitacovir » Fri Feb 12, 2016 9:17 am

yorik wrote:this is very strange... setting "vobj.Proxy = self" is the most common operation.. All python features do that. Does the rest of the Arch and Draft objects work normally? Walls, draft lines, etc
The tools like wall, draft lines, structures worked normally. Only the Axes element remains in grey.

However, if the Axis tool is not the first element created in the document, this means, you create a previous element like a rectangle, then you can create the axis element and it will work normally.

Start FreeCAD
Activate Arch WB
Create new document
Draw a rectangle
Axis tool

In this sequence it works normally.
2016-02-12 20_08_00-FreeCAD.png
2016-02-12 20_08_00-FreeCAD.png (106.45 KiB) Viewed 731 times
OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.6408 (Git)
Build type: Release
Branch: master
Hash: f942bf2729fe73998453830773cc936e8c4cb208
Python version: 2.7.8
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
::bitacovir::
===================================
One must be absolutely modern.
Arthur Rimbaud (A Season in Hell -1873)

My Blog
Mini Airflow Tunnel Project