02-14-2013 08:26 AM
I am trying to place a boolean indicator within a case structure via LabVIEW scripting and am not having any luck.
I started with the following source code, which creates and populates a case structure from an array:
https://decibel.ni.com/content/docs/DOC-22703
So my code, rather than put an enum inside each case, creates some compound arithmetic and a mask for each case. This is all working fine. I now want to place boolean indicators on the front panel that correspond to each case, and this is where my problem is. I can create the indicators, but when I look at the block diagram view, all of the indicators are located outside of the case structure, rather than the indicators being inside of each respective case.
I think the reason is that a boolean indicator is created by passing a reference to the front panel. But the problem with this is that the VI panel reference does not indicate that the boolean should be placed inside the case structure, just on the panel, so when you view in block diagram mode, it's just thrown the indicators all outside the case structure and wired them up via tunnels. I am getting the panel reference by accessing the OwningVI field of my CaseSel object. I feel like there must be some field I should be able to access that indicates to put the block-diagram boolean inside of the respective case structure, but I can't find it.
I've attached a file with 3 pics in it. One shows a pic of the code I'm using to create the indicators. One shows the type of output I'm looking for. One shows the type of output I'm getting.
Solved! Go to Solution.
02-14-2013 08:40 AM
Before you connect the wire to the terminal, call the Move method on the indicator's terminal and use one of the case structure's Diagrams[] as the owner. This will move the terminal into the structure.
02-14-2013 08:59 AM
That worked!! Thank you so much....This was 5% of the last 10% I was having a problem with. I have one more thing which I will post momentarily...thanks again!