Support macros and console logs in Assembly

This commit is contained in:
bgbsww
2024-09-19 20:35:46 -04:00
committed by Chris Hennes
parent 3395a8d4a7
commit 48c65aed76
14 changed files with 212 additions and 37 deletions

View File

@@ -56,6 +56,18 @@ For a temporary document it returns its transient directory.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="getUniqueObjectName">
<Documentation>
<UserDocu>getUniqueObjectName(objName) -> objName
Return the same name, or the name made unique, for Example Box -> Box002 if there are conflicting name
already in the document.
ObjName : str
Object name.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="mergeProject">
<Documentation>
<UserDocu>Merges this document with another project file</UserDocu>

View File

@@ -217,6 +217,18 @@ PyObject* DocumentPy::getFileName(PyObject* args)
return Py::new_reference_to(Py::String(fn));
}
PyObject* DocumentPy::getUniqueObjectName(PyObject *args)
{
char *sName;
if (!PyArg_ParseTuple(args, "s", &sName))
return nullptr;
PY_TRY {
auto newName = getDocumentPtr()->getUniqueObjectName(sName);
return Py::new_reference_to(Py::String(newName));
}
PY_CATCH;
}
PyObject* DocumentPy::mergeProject(PyObject * args)
{
char* filename;

View File

@@ -159,7 +159,7 @@ DocumentObject *GeoFeature::resolveElement(DocumentObject *obj, const char *subn
}
if(geoFeature)
*geoFeature = geo;
if(!obj || (filter && geo!=filter))
if(filter && geo!=filter)
return nullptr;
if(!element || !element[0]) {
if(append)