Adding needles changes the data type of the control. So it is not something that will be doable at run-time. I haven't gone digging to see if it can be done with scipting yet.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions Unofficial Forum Rules and Guidelines "Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
You need to add all the needles at development time. Then you can make the ones that you aren't using transparent at runtime.
This code makes the third needle transparent when run.
Crossrulz: Yes, it can be done through scripting. asdf2: Scripting does not exist in the runtime engine because scripting changes require recompilation of the VI.
AristosQueue: Can you tell me which labview version are you using? My idea was to add needles i need dynamically. Then i can save the loops (time) which just set the other needles transparent.
@preeliz
AQ is using LabVIEW 16.0a1. (You definitely don't have that version : ) but it shouldn't matter for this.)
Can you help us understand what you mean by, "Then i can save the loops (time) which just set the other needles transparent."?
We can also tell Stephen is using the 64-bit version!
There are only two ways to tell somebody thanks: Kudos and Marked Solutions Unofficial Forum Rules and Guidelines "Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Adding needles would change the data type, which cannot be done at runtime. Instead, you can interactively add all the needles you might need, then show/hide them at runtime via transparent colors, as described by AristosQueue here: http://forums.ni.com/t5/LabVIEW-Idea-Exchange/Gauge-needles/idc-p/3227144#M33268