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] Pythonparts - Unable to resolve 'NemAll_Python_Geometry'. IntelliSense may be missing for this module!!!

Schlagworte:
  • Allplan 2017
  • PythonParts
  • Visual Studio 2017!

Something is going wrong here, please let me know what was going wrong with my approach:

1) Installation of Visual Studio 2017
2) Installation of Python 3.7.4
3) Opening the project PythonParts.pyproj from Allplan\2017\Etc\PythonPartsScripts folder
4) Correcting the references *.pyd files

The point is that I get the following errors when opening the project which I cannot resolve :
- for each reference file *.pyd I get the error: Unable to resolve 'BasisExamples.FaceStyle'.
IntelliSense may be missing for this module.
- Another thing is that processor architecture of the reference "PrgLib\NemAll_Python_Palette.pyd" was built as "AMD64" processor, but I have Intel Core i7, so this is probably problem? How to resolve this issue? So if I deliver later Pythonparts on other
type of processors, there would be a problem?

Please if you provide me some solution for these issues so that I could start testing your delivered Pythonparts project!

Primoz

P.S. Any suggestion is welcome!

Visual studio project:
https://www.dropbox.com/s/j395samtzupsf1i/PythonPartsScripts.rar?dl=0

Anhänge (1)

Typ: image/png
53-mal heruntergeladen
Größe: 178,06 KiB
1 - 10 (13)

Cannot resolve why references to Allplan libraries *.pyd cannot be found in Visual Studio?

Anhänge (1)

Typ: application/pdf
1539-mal heruntergeladen
Größe: 63,80 KiB

Hello Primoz,

Before you start debugging you need to run the StartPythonDebug pythonpart from the ETC\Examples\PythonParts\ToolsAndStartExamples and click on ok. Then Allplan freezes but you can attach the process in VS and Allplan wil unfreeze and you can debug. This works until you restart Allplan.

Regarding the references I am not sure if I can help you, but I use Visual Studio 2019 and when I add the Allplan PRG folder to the search paths, the references are found. Furthermore I see that you are going to develop for Allplan 2017 (the ETC folder you mention)? I do not know if you have a specific reason for that but there are a lot of new functionalities and fixes for pythonparts done in the version until 2020-1.

I hope my reaction was some sort of help for you!

http://www.cadblanche.eu

The point is that when I do it, everything behaves well and I get the correct dialog box in Allplan telling me what to do. I am doing exactly according to instructions and start Visual Studio as follows:
- Attach to process
- Transport Python remote(ptvsd)
- When I enter PythonParts@localhost as a qualifier I get an error and everything stops here

I do not know what I did wrong - before that I downloaded ptvsd-2.2.0.zip, extracted it and copied ptvsd folder from the zip to my Python folder in Allplan/prg folder.

Obviously sth went wrong here as connection from Visual Studio to Allplan is not established.

I somehow fixed the references problem, almost came to the end, but cannot establish this connection which was the last thing before I could start debugging. Sure I will use Allplan2020 in the future, but now I am here where I am and the problem with the connection is the same!!!

Best Regards, Primoz

Anhänge (1)

Typ: application/pdf
1504-mal heruntergeladen
Größe: 82,85 KiB

Does it help when you enter localhost:5678 instead of PythonParts@localhost? That is how it works on my system

http://www.cadblanche.eu

Anhänge (1)

Typ: image/png
24-mal heruntergeladen
Größe: 21,85 KiB

Hello Primoz,

it's hard to say what are your real problem due to using Allplan 2017. Maybe you have to use Visual Studio 2015 (see https://pythonparts.allplan.com/2017-0/) or to use a different ptvsd version. With Visual Studio 2017 we are using ptvsd-4.3.2. Please try this.

Best regards
Horst

Hi,

the same story by using localhost:5678 - no connection is established!
https://www.dropbox.com/s/1cmod0r6a6sjbs2/5678.png?dl=0

I am using Visual studio 2015 and ptvsd-2.2.0.zip. I extracted zip file and copied from the zip ptvsd folder into Allplan/Prg/Python directory. Do I need to do sth else to install ptvsd?

I would really like to have this debugger working and I would be happy if you could help me to establish this connection.

Best Regards, Primoz

I installed all Python tools for visual studio as shown in video, but result is always the same - no connection can be established!
Remote Tools for Visual Studio 2015 Update 3! No changes!

I tried to run one simple python script just in visual studio and had no problem with debugging. I could see Python running perfectly. The only problem is that I cannot establish connection with Allplan through remote debugging!!!

Best Regards, Primoz

Hi There,

If I enter localhost:5678 or PythonParts@localhost as qualifier in VS does not really matter. The result is always the same - no connection with Allplan is established and the reason I am here in Python have no meaning as I started with that just because of Allplan.
Please if you can help me to establish connection with VS-Allplan so that I can start testing Allplan Python scripts.

Thank you in advance,
Primoz

1 - 10 (13)