10-30-2012 10:02 AM
Hi to everyone,
I have to build an add-on for NI VeriStand to import into NI VeriStand specific model format.
Framework used: NI VeriStand Model Framework
I used API in NIVERISTAND_API.h.
All works fine, but I have a problem/question.
I would like to know into my Cpp (unmanaged) code if the checkbox "import parameters" and "import signals" are checked or unchecked when I load the model.
In this way I can manage (load in memory or not) model parameters (and signals)
This option is useful when I load large model.
I didn't find API to acquire this information using NI VeriStand Model Framework
Can you confirm it ?
thanks so much in advances.
10-30-2012 03:41 PM
Models built with the VeriStand framework have no knowledge or concept of whether parameters or signals are imported are not. Those resources always exist in the model.
The option to import parameters and signals in VeriStand exists for performance reasons in VeriStand, and to help some users that don't want their operators to tune certain parameters or view certain probe points in the model in the form of signals.
11-05-2012 07:45 AM
Perfect, I assumed it was so and in my investigation I didn't find it in NI VeriStand Model Framework. Thanks a lot, Jarrod, for your confirmation.
I'm looking for a workaround
This framework works fine when it is used to import dll format model,
I'm using this framework to manage other format model,
I have to manage memory allocation (in general user input) and to do this I'm investigating if I can use VeriStand interface ("Add Simulation Model Window") to get user input.
In my addon I need to help some users that want to import into NI VeriStand very large model and provide their the ability to choose to import or not paramenter.
if the model has a lot of parameters their memory allocation could saturate memory reserved for the model.
If is it possible to intercept the checkbox "Import all parameter", my code can use this information to avoid to allocate in memory all parameters..
Before using my popup window to get these information from users, I'm investigating NI VeriStand .NET API and I saw the structure below (c# code)
C# |
---|
public Model( string Name, string Description, string ModelPath, int Processor, int Decimation, ushort InitialState, bool SegmentVectors, bool ImportParameters, bool ImportSignals, uint NIVeriStandServerPort ) |
This structure provide all informations which I need.
My question is, it is possible to get this information using some .NET API when the user click "OK" in the "Add Simulation Model Window" ?
When I click "OK" in "Add Simulation Model" Window I have to get information about:
- modelPath -> this is ok, I use another method
- information about Model structure, in particular the "ImportParameters" variable.
To access this structure I'm trying to use ModelPath information as key.
About your experience is it possible to inrcept these information at this step of the process ?
Thanks a lot for sharing your experience 😉
11-07-2012 11:39 AM
I can not think of a way that would have any access to this information. The model, once generated and compiled, is expected to present a static list of available resources in the form of signals and parameters.