Forum de la communauté Allplan

[Question] Printer connection issue by generating Plan Layout

Balises:
  • Allplan
  • 2024
  • Layouts
  • Python
  • API

Hi everybody,
I'm struggling with generating of Plan Layouts with Python API.
I'm getting this message (see the picture) and after that Allplan just hanging on.
That is just Allplan 2024 issue, the same python code works good in Allpln 2023.
Why Allplan trying to connect to some printer even if it's just Layouts creation and not printing?

P.S. I've already delete all Printer configurations in Allmenu (Konfiguration->Ausgabekanaele).

Thanks!

Pièces-jointes (1)

Type: image/png
Téléchargé 22 fois
Size: 7,35 KiB

Hi,

Thanks for pointing this out. In order to help you, I have reproduce the issue on my machine. Have you managed to point out, which API call exactly is causing the window to appear? E.g. by stepping over in the debug mode? Alternatively, if I could reproduce the issue with any of the PythonParts examples, please tell me which one to use.

Best,
Bart

Hi Bart,
thanks for your response!
The issue comes if there are some printers saved in Windows settings that are not available, and the Allplan tries to build connection to some of that printers.
The warning message appears also in debug exactly by self.layout_service.LoadFile(self.doc, self.index) call (where self.layout_service = BaseElements.LayoutFileService()).
If I create several layouts in a row, it happens by second call.

Regards,
Ksenia

I also noticed some changes in API. In Layout File Service function LoadFile has now three arguments. Isn't the loadState an attribute of Drawing File Service?

Pièces-jointes (2)

Type: image/png
Téléchargé 22 fois
Size: 55,57 KiB
Type: image/png
Téléchargé 21 fois
Size: 48,75 KiB

Hi,retro bowl college
You can try the following steps to fix the problem: check for updates to Allplan 2024 and reinstall if necessary, review your Python code to make sure there are no references to printing, remove all printer settings and try running again with minimal code. If you are still having problems, contact Allplan technical support or join the community forum to find a solution.