VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

VeriStand API - make active a SDF

Solved!
Go to solution

Hello,

I'm working on VS 2020 and LV 2020. I want to command VS via LV API.

I have the VS project that has more than one SDF.

1. How can I make active one of these SDF?

2. It is possible force VS to doesn't show the message when I undeploy the SDF?

 

Best regards,

Fabio

0 Kudos
Message 1 of 3
(1,556 Views)
Solution
Accepted by topic author fabio.int

Hi Fabio,

 

We have not introduced the ability to script .nivsprj Project files; that is the file which holds the Active SD flag in it.  There is a hope that in late 2023 we can finally get this + an ability to script .nivsscr Screen files added to a future version of the product. This has been a background TODO for the VeriStand R&D team for quite awhile.

Until that point, you can workaround this shortcoming by programmatically managing your SD files and deploy them within your own automation code.

Darin Gillis
NI - Chief Product Owner - VeriStand
0 Kudos
Message 2 of 3
(1,509 Views)

Hi Fabio,

You can manipulate the project XML file directly to achieve this.

Each SDF is saved under "/SourceFile/Project/NameScopingEnvoy/SourceFileReference" elements.

Out of all those SDF elements, the active one is called out at "/SourceFile/Project/NameScopingEnvoy/EmbeddedDefinitionReference/SdfFilePath/@SdfPath" 

 

Active SDF.png

Hope this helps.

Ravi

0 Kudos
Message 3 of 3
(1,064 Views)