05-15-2021 02:47 PM - edited 05-15-2021 02:50 PM
I've been messing with scripting and I've hit an issue where a dialog does not popup despite setting the sub vi to show the front panel when loaded. I call the prompt launcher from the main working VI, the prompt launcher vi configures the prompt with scripting, then I use the run vi invoke method from main working and the prompt front panel does not pop up.
Solved! Go to Solution.
05-15-2021 02:49 PM - edited 05-15-2021 02:52 PM
I intend to set up more complicated dialogs but for now it's simple.
05-17-2021 02:43 AM
This is from the Help for Run VI (I underlined the most relevant sentence).
Short Name: Run VI
Requires: Base Development System
Class: VI Methods
To Use: Create a method.
Starts the VI execution, similar to the Run button. This method is different than calling a VI because it uses the current values of all front panel controls for execution rather than using data passed in through parameters. This method also ignores the Execution:Show Front Panel On Call property of a VI and the Execution:Close After Call property.
On the other side:
- open references only once
- you don't need to create local variables to use Font Name twice: just wire the control value to both property nodes (the same applies to the other text settings)
- I'm not sure it's needed in this case, but I prefer to close references after usage
- avoid using Expression Nodes unless you really want to clarify a very complex formula (but a commenting free label would be ok, in case)
05-20-2021 11:42 AM
I was attempting to simplify the block diagram with the local variables and the expression nodes. I know race conditions with local variables can be avoided by writing once and using the LVs as reads, but I do remember something about expression nodes using more memory.
For opening and closing the references, I just haven't gotten that far. I know it needs to be cleaned up. I hadn't realized the run method didn't trigger the VI settings, I know RTFM. Thanks for the help!
I'm trying to make an AF script to generate a child message class with the do method and the parent message class (owned by the child actor) with read and write methods. The built in LV scripting only generates the child class. I also want it to modify the parent actor core to pass the child message class to the child actor for use in passing a message back up the tree.
05-20-2021 03:44 PM
@bghagar wrote:
I was attempting to simplify the block diagram with the local variables and the expression nodes. I know race conditions with local variables can be avoided by writing once and using the LVs as reads, but I do remember something about expression nodes using more memory.
For opening and closing the references, I just haven't gotten that far. I know it needs to be cleaned up. I hadn't realized the run method didn't trigger the VI settings, I know RTFM. Thanks for the help!
I'm trying to make an AF script to generate a child message class with the do method and the parent message class (owned by the child actor) with read and write methods. The built in LV scripting only generates the child class. I also want it to modify the parent actor core to pass the child message class to the child actor for use in passing a message back up the tree.
Seems to me that you are confusing local variables, which are variables associated with objects on the front panel, with global variables, which are actual VIs that contain values that you want to use in different places.
05-21-2021 10:10 AM
I'll replace some with FGs eventually, I'm still learning scripting and kind of practicing with the whole dynamic custom prompt thing.