Forum Allplan

[Domanda] Creating the workspace in Microsoft Studio Code [Risolto]


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

Show solution Hide solution

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

Allegati (3)

Type: image/jpeg
42 scaricato
Size: 62,66 KiB
Type: image/jpeg
34 scaricato
Size: 7,31 KiB
Type: image/jpeg
26 scaricato
Size: 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

Allegati (1)

Type: image/png
6 scaricato
Size: 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

Allegati (2)

Type: image/png
8 scaricato
Size: 5,20 KiB
Type: image/png
20 scaricato
Size: 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

Allegati (3)

Type: image/jpeg
42 scaricato
Size: 62,66 KiB
Type: image/jpeg
34 scaricato
Size: 7,31 KiB
Type: image/jpeg
26 scaricato
Size: 98,50 KiB

Hi,

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

Have a nice one,
Csaba


https://connect.allplan.com/ utilizza cookies  -  Maggiori informazioni

Accetta