icon

Support Forum

Modern web UI & PythonParts


Hello Community,

I wanted to share something with this post. It is something for the rather advanced PythonParts creators, that hit the limits of the out-of-box UI (parameters defined in .pyp file).

Recently, tools for vibe-coding are popping out of nowhere Lovable, Replit, Bolt to name a few). With these tools, you can build a cutting edge UI and don't have to know the modern web-UI frameworks like React, Angular, etc. But using them to power a PythonPart might be a tricky part.

Which is why I created this repository - a PythonPart, that leverages a web-based UI with bi-directional communication between the UI and ALLPLAN.

More details, how it's done, in the README.md.

How to try it out:

Clone the repo and follow the instructions in the README. Once you started the PythonPart in ALLPLAN, you can try it out:

  • ALLPLAN -> UI: Click in the Viewport -> the coordinates of the point are shown in the pop-up
  • UI -> ALLPLAN: Press the button in the pop-up -> a Hello World text is created in ALLPLAN

Let me know: is this something that now opens new possibilities for you?

Best,
Bart

Hi,

Well done on this initiative, here a first draft of the interface, it opens up a lot of new possibilities

Best
Christophe

Anhänge (1)

Typ: image/png
66-mal heruntergeladen
Größe: 427,12 KiB

Hi Bart and Christophe,

Here's something really good!
Is it possible to have a drop-down menu showing the hatching, patterns, line types, defined for the project in this ‘external’ interface?
That would be really nice.
Thank you.


Hi Bertrand,

The web-UI lives in the cloud, completely outside of ALLPLAN. If you can send something to that UI via bridge object, you can also show it there. Currently, I can't see the way to do that with hatchings. Also, I don't think that would be the way to go.

If I would need to do that, I would programmatically create a sprite with all the hatchings from ALLPLAN by creating all of them in a drawing file, making a screen shot and then use it in my web component (e.g. in an shadcn drop-down menu component).

Cheers,
Bart

Hi Bart,

Thank you for your reply.
It's definitely a gap.
Taking a screenshot of all the previews is doable when you’re developing for yourself, but for distributed products it’s becoming a bit outdated and it’s not very user-friendly.
An alternative option would be to have an internal Python command that generates images in the size of your choice to a folder of your choice.
Then the problem would be bypassed and an external interface could (finally) be used to easily set all the format options.
It’s probably possible: Allplan does this itself to create its drop-down lists, but without storing the images anywhere.