06-26-2020 05:26 AM
Hello,
I am trying to set password for sequence files during deployment in automated way.
Engine engine = new Engine();
SequenceFile seq = engine.GetSequenceFileEx(seqPath);
seq.??
I ve tried to find some documentation but no success so far.
Solved! Go to Solution.
06-26-2020 04:27 PM
seq.AsPropertyObject.SetTypeDefinitionProtection(0x2, <password>)
Hope this helps,
06-27-2020 02:40 AM
Thanks, exactly what I was looking for.
06-29-2020 04:14 AM
Script in c# works fine, next step is to create powershell script to do the same but I ca not instantiate Engine class:
$assembly = [System.Reflection.Assembly]::Load("NationalInstruments.TestStand.Interop.API, Version=19.0.0.172, Culture=neutral, PublicKeyToken=ad9244eb3b825cd8")
$engine = New-Object NationalInstruments.TestStand.Interop.API.Engine
The output is:
New-Object : A constructor was not found. Cannot find an appropriate constructor for type NationalInstruments.TestStand.Interop.API.Engine.
At line:2 char:11
I am not expert in powershell scripts so there might be something simple that I do not understand clearly.
Thanks
06-29-2020 04:50 AM
nevermind, it was related to 32 and 64 bit of powershell.