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

Method getTypeIdOfProperty

src/App/PropertyContainerPyImp.cpp:146–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

144}
145
146PyObject* PropertyContainerPy::getTypeIdOfProperty(PyObject* args)
147{
148 char* pstr {};
149 if (!PyArg_ParseTuple(args, "s", &pstr)) {
150 return nullptr;
151 }
152
153 Property* prop = getPropertyContainerPtr()->getPropertyByName(pstr);
154 if (!prop) {
155 PyErr_Format(PyExc_AttributeError, "Property container has no property '%s'", pstr);
156 return nullptr;
157 }
158
159 Py::String str = Base::toPyString(prop->getTypeId().getName());
160 return Py::new_reference_to(str);
161}
162
163PyObject* PropertyContainerPy::setEditorMode(PyObject* args)
164{

Callers

nothing calls this directly

Calls 5

toPyStringFunction · 0.85
new_reference_toFunction · 0.85
getPropertyByNameMethod · 0.45
getNameMethod · 0.45
getTypeIdMethod · 0.45

Tested by

no test coverage detected