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

Method sSendActiveView

src/Gui/ApplicationPy.cpp:1132–1150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1130}
1131
1132PyObject* ApplicationPy::sSendActiveView(PyObject* /*self*/, PyObject* args)
1133{
1134 char* psCommandStr = nullptr;
1135 // NOLINTNEXTLINE(cppcoreguidelines-pro-type-cstyle-cast)
1136 PyObject* suppress = Py_False;
1137 if (!PyArg_ParseTuple(args, "s|O!", &psCommandStr, &PyBool_Type, &suppress)) {
1138 return nullptr;
1139 }
1140
1141 requirePythonMainThread("FreeCADGui.SendMsgToActiveView");
1142
1143 if (!Application::Instance->sendMsgToActiveView(psCommandStr)) {
1144 if (!Base::asBoolean(suppress)) {
1145 Base::Console().warning("Unknown view command: %s\n", psCommandStr);
1146 }
1147 }
1148
1149 Py_Return;
1150}
1151
1152PyObject* ApplicationPy::sSendFocusView(PyObject* /*self*/, PyObject* args)
1153{

Callers

nothing calls this directly

Calls 4

requirePythonMainThreadFunction · 0.85
asBooleanFunction · 0.85
sendMsgToActiveViewMethod · 0.80
warningMethod · 0.45

Tested by

no test coverage detected