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] Vscode and Pythonparts

Schlagworte:
  • PythonParts
  • Visual
  • Studio
  • Code

Hello everyone,

I' did several trials in order to link between the Pythonparts and Visual studio code by following the instructions which are

available in the Pythonparts framework folder, but unfortunately I'm always getting the same error (Please have a look at the attachechd

Photo).

could you please, help me to solve the problem.

Anhänge (1)

Typ: image/png
91-mal heruntergeladen
Größe: 153,37 KiB

Hilfreichste Antwort anzeigen Hilfreichste Antwort verbergen

Hello,

have you executed all the steps shown in "Debugging with Visual Studio Code"?

You need to have a running Allplan and connect the debugger to Allplan by selecting "Attach to Allplan".

Best regards
Horst

Hello,

have you executed all the steps shown in "Debugging with Visual Studio Code"?

You need to have a running Allplan and connect the debugger to Allplan by selecting "Attach to Allplan".

Best regards
Horst

I also have some troubles.

Iam trying execute the steps in "Debugging with Visual Studio Code", but when I try the pythonscript "StartPythonDebug"

I get a message : Exception occurred during 'create_element'in script Toolsandstartexamplts\startPythonDebug.py --> please have a look at the trace window.

When I look in the trace window I have the following message:

=======================================================================================================

String table error:

Filename c:\programdata\nemetschek\allplan\2023\etc\examples\pythonparts\toolsandstartexamples\startpythondebug_eng.xml does not exist

=======================================================================================================

Traceback (most recent call last):
File "C:\ProgramData\Nemetschek\Allplan\2023\Etc\PythonPartsFramework\GeneralScripts\BuildingElementInputService.py", line 55, in create_element
create_ele_result = create_element(input_data.build_ele_list[0],
File "C:\ProgramData\Nemetschek\Allplan\2023\Etc\PythonPartsExampleScripts\ToolsAndStartExamples\StartPythonDebug.py", line 77, in create_element
if debugpy.is_client_connected():
AttributeError: module 'debugpy' has no attribute 'is_client_connected'
=======================================================================================================

Hello,

please check the version of your debugpy.

In combination with VSCode it's necessary to have the current version installed.
The current version is 1.6.7.

Best regards
Horst

That was a part of the problem. Was installed but not on the right location. That problem is gone know. Debugging Allplan is now atttached. That looks ok.

Now I get something else:

Traceback (most recent call last):
File "c:/ProgramData/Nemetschek/Allplan/2023/Etc/PythonPartsExampleScripts/ToolsAndStartExamples/HelloWorld.py", line 5, in <module>
import NemAll_Python_Geometry as AllplanGeo
ModuleNotFoundError: No module named 'NemAll_Python_Geometry'
PS C:\ProgramData\Nemetschek\Allplan\2023\Etc\PythonPartsScripts>

ModuleNotFoundError: No module named 'NemAll_Python_Geometry'

Do you have a Idea where I must look, what Iam doing wrong?