icon

Das Wissen aller Anwender nutzen

Im Allplan Connect Forum tauschen sich Anwender aus, geben wertvolle Tipps oder beraten sich bei ganz konkreten Aufgabenstellungen − auch international.
Und damit wirklich keine Frage unbeantwortet bleibt, unterstützen die Mitarbeiter des Technischen Supports ebenfalls aktiv das Forum.

Es erwarten Sie:

  • Foren-Vielfalt aus CAD Architektur, CAD Ingenieurbau uvm.
  • Tipps von User für User
  • international: Deutsch, Englisch, Italienisch, Französisch und Tschechisch

Melden Sie sich jetzt an und diskutieren Sie mit!

Zur Registrierung

[Frage] "Not enough Memory" when deleting PythonPart

Schlagworte:
  • Allplan
  • 2025
  • LibraryElements
  • Crash

In my testing Script (see attachment) I tried to create a simple LibraryElement and place it within a pythonpart. Placing the python part and editing it works as intendet. Once I delete it however Allplan 2025 crashes or gives me the error message "Not enough Memory". I have tried Placing my TestCube.sym locally on my PC as well which did not work.

Anhänge (2)

Typ: text/x-script.python
136-mal heruntergeladen
Größe: 1,25 KiB
Typ: image/png
4-mal heruntergeladen
Größe: 5,65 KiB

Hi,

your code

    lib_ele = AllplanBasisElements.LibraryElement(props_a)
    model_elements = ModelEleList()
    model_elements.append(lib_ele)
    
    pyp_util.add_library_elements(lib_ele)
    python_part = pyp_util.create_pythonpart(build_ele)
    return CreateElementResult(python_part)

adds a child element to the created PythonPart, but does not specify any view (in ALLPLAN terminology also known as a slide of a smart symbol). I am not sure, but that might be the issue. See here, in particular this remark:

If the PythonPart should solely consist of a library element, it is advisable to create at least a bounding box around it as an unprintable help construction and add it to the PythonPart container with add_pythonpart_view_2d3d. As a result, the user is still able to modify the PythonPart by double-click on the bounding box, whereas the library element remains a child-element of the PythonPart.

Cheers,
Bart

Hi Bart,

thank you for your answer.

As i understand it, add_pythonpart_view_2d3d in this context concerns only the bounding box. Regardless I have tried it on the Library Element and the error still occurs. Sometimes Allplan crashes completely. I have now also tried using the example script given in... https://github.com/NemetschekAllplan/PythonPartsExamples/blob/2025/PythonPartsExampleScripts/BasisExamples/UserObjects/SymbolLibraryElement.py
... but yet again the same error still occurs.

Regards,
Elias

Hi Elias,

well, then I suppose the issue must be in the symbol itself. I would try with different ones. Beginning with those delivered with ALLPLAN.

If they also produce this error, then I would reinstall ALLPLAN completely.

If not, maybe you can modify the symbol to a point, where it doesn't produce the error anymore. Sorry, that I can't give you a direct solution, but there can be so many things wrong with that symbol. And apparently, there must be something wrong with how Python interface creates the symbol, since you don't (?) encounter this error, when placing the symbol with native ALLPLAN function.

Cheers,
Bart