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

[Frage] Python Part dissapear after creation with Visual script

Schlagworte:
  • Allplan 2021-0-7

Hi all, I am new with Visual Script.

I create a new object via Visual Script, then save it.
When I click Close (in the pallette) or ESC, the object dissapear from the screen.
Create model is ON. After saving appear in the library without picture. Where am I wrong?

Thank you.

Anhänge (3)

Typ: image/png
48-mal heruntergeladen
Größe: 518,13 KiB
Typ: image/png
27-mal heruntergeladen
Größe: 569,67 KiB
Typ: image/png
25-mal heruntergeladen
Größe: 297,22 KiB

Hallo Petrov

From the screenshot you provide, it seems that you are using Allplan 2021-0-6 or 2021-0-7. We tested from our side we don't have such an issue.

Could you please provide some information from Allplan trace? Normally, if something goes wrong, it will provide some addtional information about the problem. Allplan trace can be opened from Allplan Services. (see attached screenshot)

Apart from that, could you try following to check, if it helps/works?

  • run the script directly from Allplan library, or
  • reload the project or drawing file after save the PythonPart (vs) object

Product Owner API, Allplan GmbH

Anhänge (1)

Typ: image/png
31-mal heruntergeladen
Größe: 104,73 KiB

Hello Xinling, thank you for your reply.

Please see the attached pictures.
1. I choose the element "Column Two Floors" from the library
2. If I click "Close" nothing happened, if I click ESC, the lines disappear (the handles not)
3. Check Allmenu=>Service

Best regards,
Stefan

Anhänge (3)

Typ: image/png
20-mal heruntergeladen
Größe: 414,84 KiB
Typ: image/png
7-mal heruntergeladen
Größe: 370,98 KiB
Typ: image/png
13-mal heruntergeladen
Größe: 433,97 KiB

sorry I didn't explained it correctly...

After you turn on the trace, if you try to create a PythonPart again from Visual Scripting or directly from library in Allplan. Does it show any additional information? Could you provide some screenshot or just paste the information from trace?

Product Owner API, Allplan GmbH

Unfortunatly does not provide any addtional information.
I try to create a file - Allplan.out, but this file is not created as well.
If you need some other information?
I attach the pyp file, if It can help.

Anhänge (1)

Typ: text/xml
958-mal heruntergeladen
Größe: 29,11 KiB

Normally if you choose to show trace and let it write to window, you will get a separate trace window which show some runtime information, after you restart the allplan.

I just tried the script you attached, trace window did show some error (see attached screenshot). We will analyze the problem. Did you get a similar error?

And what kind of error do you have, if you create a PythonPart object via Visual Scripting?

Product Owner API, Allplan GmbH

Anhänge (1)

Typ: image/png
30-mal heruntergeladen
Größe: 45,75 KiB

Hope this will help you to understand better.

Anhänge (1)

Typ: image/png
41-mal heruntergeladen
Größe: 268,44 KiB

Thanks for providing the screenshot. I've already informed our developer to check this issue. I will reach you back, if there is any solution for solving the problem.

Product Owner API, Allplan GmbH