Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

NXOpen, Python & VS Code

Status
Not open for further replies.

Frank2288

Mechanical
Nov 20, 2015
38
0
0
IT
Hi all, I always used NX programming features relying on Visual Studio and VB libraries.
Recently I started looking into Python, mainly to exploit the tools offered by several precompiled libraries that are very useful.

I'd like to be able to run scripts built outside of NX, using Visual Studio Code. Has anyone managed to import NXOpen Python libraries in VS Code correctly. I'm not a programmer and my programming skills mainly rely on the ability to exploit intellisense (autocomplete) code in my programming environment.

I tried to import NXOpen python libraries but I couldn't do it.
Any advices?

Thanks
 
Replies continue below

Recommended for you

Hi
Could you let me know the procedure how you tried to import the NXopen libraries in VS Code. It is simple in Visual Studio, right click references and browse to the folder, But VS code is not having that option .
 
To be fair, I'havent found any clear procedure to follow and I'm not sure that my attempts can be considered valid. I tried to add the C:\Program Files\Siemens\NX1899\NXBIN\python folder to the project and tried to import.

Any help would be appreciated.

Also, if someone has managed to use a different programming environment with python/NXOpen would be helpful too.

 
Hi

I have added below xml code in xxxx.csproj file and able to use NXOpen intellisense in visual studio code. need to create a folder named "dll" in the project directory.


<ItemGroup>
<Reference Include="NXOpen">
<HintPath>dll\NXOpen.dll</HintPath>
</Reference>
<Reference Include="NXOpen.UF">
<HintPath>dll\NXOpen.UF.dll</HintPath>
</Reference>
<Reference Include="NXOpen.Utilities">
<HintPath>dll\NXOpen.Utilities.dll</HintPath>
</Reference>
<Reference Include="NXOpenUI">
<HintPath>dll\NXOpenUI.dll</HintPath>
</Reference>
</ItemGroup>
 
Status
Not open for further replies.
Back
Top