Code: Select all
OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.20.29177 (Git)
Build type: Release
Branch: releases/FreeCAD-0-20
Hash: 68e337670e227889217652ddac593c93b5e8dc94
Python 3.8.10, Qt 5.15.2, Coin 4.0.1, Vtk 8.2.0, OCC 7.6.2
Locale: English/United States (en_US)
Installed mods:
* Help 1.0.3
The follow code works when it's the original name Point. But renaming to StartPoint throws the following error.
Code: Select all
(X1, Y1, Z1) = (doc.getObject('Point').Shape.Point.x, doc.getObject('Point').Shape.Point.y, doc.getObject('Point').Shape.Point.z)
###### That works.
line 84, in <module>
(X1, Y1, Z1) = (doc.getObject('StartPoint').Shape.Point.x, doc.getObject('StartPoint').Shape.Point.y, doc.getObject('StartPoint').Shape.Point.z)
<class 'AttributeError'>: 'NoneType' object has no attribute 'Shape'