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

RectangleObject on path from OffsetPolyline3DByDistance by distance = 0.000

Schlagworte:
  • OffsetPolyline3DByDistance
  • ExecPythonScript

Hello together,
I am trying to get the RectangleObject from the path, which I get from OffsetPolyline3DByDistance, see Visual-Code-Picture below.
If I use float numbers (-0,15m; +0,15m) it works fine, but if I put 0 it just doesnt work.

The Allplan says:"RectangleObject: Path is empty". I tried to build the new polyline from the origin polyline and use ExecPythonScript with the following code in order to make a lind of if-statement, but I think I want to much from this node. I think the node can not return objects..

def function_to_execute(count, polyline_with_offset, polyline_original):
    if count == 1:
        result = polyline_with_offset
    elif count == 0:
        result = polyline_original
    return result

My questions:
1) what could be the reason, why the polyline with 0 offset even doesnt get created?
2) how can I build something as "if statement":
if distance = 0 → use polyline_original; else → use polyline_with_offset?

Thank you very much in advance for the help.

Anhänge (2)

Typ: image/png
32-mal heruntergeladen
Größe: 63,50 KiB
Typ: text/xml
600-mal heruntergeladen
Größe: 4,44 KiB

Hilfreichste Antwort anzeigen Hilfreichste Antwort verbergen

It seems to be bug in our API, as the coded PythonPart also has the same issue. We will investigate it.

To workaround, you can try the node "OutputTrueFalseSelector". It will return the object based on a boolean value.

Product Owner API, Allplan GmbH

Anhänge (1)

Typ: image/png
34-mal heruntergeladen
Größe: 41,48 KiB

It seems to be bug in our API, as the coded PythonPart also has the same issue. We will investigate it.

To workaround, you can try the node "OutputTrueFalseSelector". It will return the object based on a boolean value.

Product Owner API, Allplan GmbH

Anhänge (1)

Typ: image/png
34-mal heruntergeladen
Größe: 41,48 KiB