View Issue Details

IDProjectCategoryView StatusLast Update
0002107FreeCADBugpublic2015-09-04 15:53
Reporterxibinke Assigned Toyorik  
PriorityhighSeveritymajorReproducibilityalways
Status closedResolutionno change required 
PlatformlinuxOSUbuntuOS Version14.04LTS
Fixed in Version0.16 
Summary0002107: Draft API cannot be interpreted under pure python?
DescriptionWhen I run the python script under linux command line, no shape showed on the Document window. After that I draw rectangle under GUI, nothing appeared. At this situation, the object labels and the icon besides have grey color.

import FreeCAD,FreeCADGui,Part,Draft
FreeCADGui.showMainWindow()
FreeCADGui.activateWorkbench("DraftWorkbench")
FreeCAD.newDocument("Test")
rec = Draft.makeRectangle(10,10)
FreeCAD.ActiveDocument.recompute()
FreeCADGui.exec_loop()
TagsNo tags attached.
FreeCAD Information

Activities

xibinke

2015-05-20 07:15

reporter   ~0006152

Here is the more detailed:
http://forum.freecadweb.org/viewtopic.php?f=22&t=10861

yorik

2015-09-04 15:53

administrator   ~0006331

This is not a bug, it is actually the normal behaviour: If you create an object while the GUI is not running, it doesn't have a View provider. Therefore, it is greyed out when you run the GUI.

The solution for this is either to save the file, then open it with the GUI up, which will add a default view provider automatically, or add the View Provider yourself once the GUI is up.

yorik

2015-09-04 15:53

administrator   ~0006332

I'll close this report because there is nothing to do here, please reopen if needed.

Issue History

Date Modified Username Field Change
2015-05-18 06:30 xibinke New Issue
2015-05-20 07:15 xibinke Note Added: 0006152
2015-09-04 15:53 yorik Note Added: 0006331
2015-09-04 15:53 yorik Note Added: 0006332
2015-09-04 15:53 yorik Status new => closed
2015-09-04 15:53 yorik Assigned To => yorik
2015-09-04 15:53 yorik Resolution open => no change required
2015-09-04 15:53 yorik Fixed in Version => 0.16