MCPcopy Create free account
hub / github.com/FreeCAD/FreeCAD / sEditDocument

Method sEditDocument

src/Gui/ApplicationPy.cpp:746–760  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

744};
745
746PyObject* Gui::ApplicationPy::sEditDocument(PyObject* /*self*/, PyObject* args)
747{
748 if (!PyArg_ParseTuple(args, "")) {
749 return nullptr;
750 }
751
752 requirePythonMainThread("FreeCADGui.editDocument");
753
754 Document* pcDoc = Application::Instance->editDocument();
755 if (pcDoc) {
756 return pcDoc->getPyObject();
757 }
758
759 Py_Return;
760}
761
762PyObject* Gui::ApplicationPy::sActiveDocument(PyObject* /*self*/, PyObject* args)
763{

Callers

nothing calls this directly

Calls 3

requirePythonMainThreadFunction · 0.85
editDocumentMethod · 0.80
getPyObjectMethod · 0.45

Tested by

no test coverage detected