[Pregunta] Printer connection issue by generating Plan Layout

Etiquetas:
  • 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!

Adjuntos (1)

Type: image/png
Descargado 22 veces
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?

Adjuntos (2)

Type: image/png
Descargado 22 veces
Size: 55,57 KiB
Type: image/png
Descargado 21 veces
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.