Toponaming/Part: Transfer in python ElementMapVersion

This commit is contained in:
Zheng, Lei
2024-04-10 10:29:57 -04:00
committed by bgbsww
parent 6291078939
commit 2377175ab1
6 changed files with 66 additions and 0 deletions

View File

@@ -745,6 +745,22 @@ PyObject* DocumentObjectPy::getPathsByOutList(PyObject *args)
}
}
PyObject* DocumentObjectPy::getElementMapVersion(PyObject* args)
{
const char* name;
PyObject* restored = Py_False;
if (!PyArg_ParseTuple(args, "s|O", &name, &restored)) {
return NULL;
}
Property* prop = getDocumentObjectPtr()->getPropertyByName(name);
if (!prop) {
throw Py::ValueError("property not found");
}
return Py::new_reference_to(
Py::String(getDocumentObjectPtr()->getElementMapVersion(prop, Base::asBoolean(restored))));
}
PyObject *DocumentObjectPy::getCustomAttributes(const char* ) const
{
return nullptr;