Talk:Topological data scripting: Difference between revisions

From FreeCAD Documentation
No edit summary
 
No edit summary
Line 17: Line 17:


: show() is probably not available in your version. But you can achieve the same with a bit more of typing.
: show() is probably not available in your version. But you can achieve the same with a bit more of typing.
App.newDocument()
doc=App.newDocument()
App.ActiveDocument.addObject("Part::Feature").Shape=b
obj=doc.addObject("Part::Feature")
obj.Shape=b
: -- [[User:Wmayer|Wmayer]] 15:11, 1 July 2008 (CEST)
: -- [[User:Wmayer|Wmayer]] 15:11, 1 July 2008 (CEST)

Revision as of 13:13, 1 July 2008

Hellow,Please teach me a solution.

After File->New command, I input a command in python console as follows.

>>>>import Part

>>>>b = Part.createBox(0,0,0,100,100,100)

Next command does not work.

>>>>Part.show(b)

Traceback (most recent call last):

 File "<input>", line 1, in <module>

AttributeError: 'module' object has no attribute 'show' [User:Aki]

show() is probably not available in your version. But you can achieve the same with a bit more of typing.
doc=App.newDocument() 
obj=doc.addObject("Part::Feature")
obj.Shape=b
-- Wmayer 15:11, 1 July 2008 (CEST)