icon

Support Forum

[Frage] Communication between PythonPart and External Application

Schlagworte:
  • Allplan
  • PythonParts
  • Interactor
  • Sockets
  • Http
  • Communication
  • API
  • Automation

Hello everyone,

For a personal project, I want to visualize walls that have been drawn in Allplan in my own 3D environment which is a local running javascript application (which runs as a native app so i can access files on my pc).
I would like to communicate with Allplan real-time, but i cant seem to find any official documentation on how to do this.

I tried making a PythonPart interactor that sets up a http server (localhost) but when trying to do a very simple GET request, i cant even get a response.

I also red about some other options like using files (let PythonPart export geometry of a wall to a file on the computer and read the file with my javascript application).
And using sockets.

But still, i found nothing about this in offical documentation

So my question: does anyone have an idea on how to set up this communication? Or does anybody can link me to the official documentation that explains how this should be done?

Thanks.
With kind regards,
Jesper

Hi,

You may search a tool like requests to establish a communication with your app - requests is installed with Allplan.

With a PythonPart (ScriptObject or Interactor) you can extract the geometry (here the examples depending of what you want).

Be careful with the selection, a global wall will return an 1D object (line - as explain here). If want the real geometry you need to select the wall tiers.

Best
Christophe