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] Creating the workspace in Microsoft Studio Code [Gelöst]


Hi Everyone,

I'm having an issue with creating the workspace in MS Code.
I am following the steps described on:
https://pythonparts.allplan.com/2023/getting_started/

After installing Microsoft Studio Code, together with the reccomended extensions (Python, Pylance, PythonIndent, Pylint and StudioIcons), I should create the workspace.
This needs to be done by "quickly running the PythonPart [CreateVisualStudioWorkspace] in Allplan".
As described on the site, this PythonPart is located in the folder "…\etc\Examples\PythonParts\ToolsAndStartExamples".

I simply can not manage to get to this folder in Allplan and run the script.

Does any of you have an idea for solving this problem?

Thank you in advance,
Csaba

Lösung anzeigen Lösung verbergen

Hi,

The workspace works with Visual Studio Code maybe it's a mistake in the name of this topic.

In your library you have to add a directory, choose a name and select your "ETC" folder ( C:\ProgramData\Nemetschek\Allplan\2023\Etc for example).

Next you will have access to all script's examples and in ToolsAnsStartExamples you have CreateVisualStudioCodeWorkspace.

It will create the file PythonParts_VsCode.code-workspace directly in the "ETC" folder and you can open it with Studio Code.

Best

Anhänge (3)

Typ: image/jpeg
52-mal heruntergeladen
Größe: 62,66 KiB
Typ: image/jpeg
44-mal heruntergeladen
Größe: 7,31 KiB
Typ: image/jpeg
34-mal heruntergeladen
Größe: 98,50 KiB

Hello,

ETC is in "C:\ProgramData\Nemetschek\Allplan\2024" (for example if you use Allplan 2024).
"C:\ProgramData" is a standard folder from Windows, hidden by default.
So, change you settings in Windows Explorer to show hidden folders, or paste the path in Windows Explorer, or use the function in Allmenu to go to ETC folder.


Hello Bertrand,

Thank you for the quick answer.

I have set the folder to visible, now in can see the scripts in Windows Explorer.
The problem is that I don't know how to access these scripts in Allplan.

In the Library tab, I have set the filter to PythonParts.
Under the Default folder, in the PythonParts folder, these example scripts do not appear.

I have no idea how I could run the [CreateVisualStudioWorkspace] script to set up the workspace in Microsoft Studio Code.

Thank you,
Csaba

Anhänge (1)

Typ: image/png
8-mal heruntergeladen
Größe: 25,57 KiB

Hello Csaba,

You can drag and drop the *.pyp file from the Examples folder to your current drawing in Allplan.


Hello Bertrand,

I have tried the Drag-and-Drop method for the CreateVisualStudioCodeWorkspace.pyp file, and it resulted in the following error message:
"Script ToolsAndStartExamples.CreateVisualStudioCodeWorkspace not found"

Seems that Allplan can not find the CreateVisualStudioCodeWorkspace.py file, although, after checking it can be found under:
..\Etc\PythonPartsScripts\ToolsAndStartExamples

I have run another PythonPart, the BeamGeometry.py from the PP-editor library. I runs smoothly, without any problem.

Any idea could be wrong?

Csaba

Anhänge (2)

Typ: image/png
10-mal heruntergeladen
Größe: 5,20 KiB
Typ: image/png
24-mal heruntergeladen
Größe: 30,00 KiB

Hello Csaba,

Maybe, contact the support...


Hello Bertrand,

I have already tried, this is why I'm trying on the Forum.
Sadly, in Romania, I can not get any supprt on the PythonParts side.

Have a great day and thank you for your help.
Csaba

Hello Csaba,

Maybe, reinstall Allplan on itself...
Or check that you've done everything correctly using the online help.


Hi,

The workspace works with Visual Studio Code maybe it's a mistake in the name of this topic.

In your library you have to add a directory, choose a name and select your "ETC" folder ( C:\ProgramData\Nemetschek\Allplan\2023\Etc for example).

Next you will have access to all script's examples and in ToolsAnsStartExamples you have CreateVisualStudioCodeWorkspace.

It will create the file PythonParts_VsCode.code-workspace directly in the "ETC" folder and you can open it with Studio Code.

Best

Anhänge (3)

Typ: image/jpeg
52-mal heruntergeladen
Größe: 62,66 KiB
Typ: image/jpeg
44-mal heruntergeladen
Größe: 7,31 KiB
Typ: image/jpeg
34-mal heruntergeladen
Größe: 98,50 KiB

Hi,

The steps described worked like butter.
I'm really greatfull for your help.

Have a nice one,
Csaba