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

Method execute

src/Mod/TechDraw/App/DrawParametricTemplate.cpp:86–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84}
85
86App::DocumentObjectExecReturn *DrawParametricTemplate::execute()
87{
88 std::string temp = Template.getValue();
89 if (temp.empty()) {
90 return App::DocumentObject::StdReturn;
91 }
92
93 Base::FileInfo tfi(temp);
94 if (!tfi.isReadable()) {
95 // if there is a old absolute template file set use a redirect
96 return App::DocumentObject::StdReturn;
97 }
98
99 try {
100 Base::Interpreter().runFile(temp.c_str(), true);
101 }
102 catch(const Base::Exception& e) {
103 PyErr_SetString(PyExc_ImportError, e.what());
104 }
105 return App::DocumentObject::StdReturn;
106}
107
108int DrawParametricTemplate::drawLine(double x1, double y1, double x2, double y2)
109{

Callers

nothing calls this directly

Calls 6

isReadableMethod · 0.80
runFileMethod · 0.80
getValueMethod · 0.45
emptyMethod · 0.45
c_strMethod · 0.45
whatMethod · 0.45

Tested by

no test coverage detected