12-10-2018 07:48 AM
Hello,
In the process to tidy up my code without needing to rewrite it completely, I decided to put the "UI" part as a strict typedef and display it in the front VI. Then I exported the block diagram in a subVI and used the control reference to drive the subvi. It works very well (event if other solutions might be better, but need much more time to migrate to) except one detail:
I use my typedef to create the control for the Subvi, but I also use it as the indicator. However, since I'm primarily using it as a control, all elements in the cluster are changed in a "control form". I could partially solve this problem by disabling the parts that I use as indicator to avoid that the user changes the values. however my Numeric indicator for example are still displayed as a control with the controlling arrows.
I there any way to avoid this ?
Thank you and best regards,
Yannick
Solved! Go to Solution.
12-10-2018 07:53 AM
If a cluster is an indicator, all it's content is displayed as indicator. If it's a control, everything in it will be displayed as control.
AFAIK, there is no way around it.
12-10-2018 08:05 AM
what a pity ...
Any other way to describe completely the UI of a subVI and use it in the front panel and subVI?
Describing control and indicator separately would be a bit messy in my opinion.
12-10-2018 08:53 AM
In fact, what I need would be a pane but stored in an external file.
which should be an option in any proper developing language in my opinion.
I precise that I can't use sub-panels, since I'm developing for a CRio device.
12-10-2018 09:20 AM
12-10-2018 09:32 AM
Thank you for this very simple but efficient answer 🙂
I didn't know this was possible. Yes it solves my problem.
Now I just hope this way of using the control will work as intended and not cause any bug.
Since it doesn't seem to be the intended use.
12-10-2018 09:39 AM
You probably want to set the disabled property to "disabled and greyed" so the user doesn't think they are supposed to input something there. Or set the property to "disabled" and color the controls like indicators.
12-10-2018 09:39 AM
wiebe is right, however increment/decrement arrows can be hidden (right-click > Visible Items) and the controls disabled.