NI TestStand Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
KevRotork

Provide programmatic access to "Python Module Viewer"

Status: New

Recently I was trying to configure the Python Adapter programmatically as part of a package (.nipkg) install to configure TestStand for my operators. I am trying to get programmatic access to the Python Adapter configuration in TestStand to Read and write these values. I am most of the way there, I am just struggling with the "Python Module Viewer" section, getting the Application Path and the Arguments.

 

Configure >> Adapters >> Python

 

Python Module Viewer

 

KevRotork_0-1752478204759.png



In TestStand statement step I am doing

RunState.Engine.GetAdapterByKeyName("Python Adapter").asPythonAdapter

And this gives me access to everything else.

 

Linked to Service Request: 03715194

1 Comment
barneysmith15
Member

As a workaround these settings are accessible through the config file C:\ProgramData\National Instruments\TestStand 2022 (64-bit)\Cfg\Adapters.cfg. It should be possible to edit this file directly - see:

<_PythonAdp_PyModuleViewerAppPath typename='Path' xsi:type='Path' classname='PathValue'>


However this isn't ideal, and given that all the other settings in this menu are accessible through the API it would make sense for this to be available too.