VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Set model inport default value using System Defintion API

Solved!
Go to solution

I'm trying to change the default value of a model inport (model is already loaded in system definition) using the .NET API for System Definitions.

 

I see that there is a property on the Channel object to get the default value but it is read-only and I was unable to find a method to set it.

 

Anyone know of a way to set the default value for a model inport using the API?  Or, is there some other method that I am unaware of to set default values (perhaps similar to how parameters are set at run-time).

 

I'm currently using VeriStand 2013 SP1.

0 Kudos
Message 1 of 2
(2,603 Views)
Solution
Accepted by topic author NathanJD

Well, I was playing around with the API for a bit longer and I noticed that the inport object has a property called "InitialValue".  I figured I'd give it a shot since "initial" has a similar meaning to "default" in this case.  It turns out that setting the InitialValue does indeed set the DefaultValue property for that inport (tested with scalar inports only).

0 Kudos
Message 2 of 2
(2,594 Views)