12-15-2023 05:39 AM
HI,
Iam developing VI's using NI scripting features , In the below picture shows developed VI After scripting code ran. That constants contains morethan 10 letters but showing only 3 to 4 words.
If you click manually on the Constants you will get size to text option But by using Labview scripting that option is not available and can't able to get this option. What I need is , If you run Scripting code for the below constants to be created, Size to text has to happen itself in the newly generated VI
I need solution for the Size to text feature implementation Using Labview Scripting for the following VI's constants.
Thank you,
Simha
Solved! Go to Solution.
12-15-2023 08:23 AM
Hi Simhachalam,
Unfortunately, there is no direct way to resize a constant array to its widest element.
Check out VI "Size Array Constants To Contents.Exec In User Context.vi" in built-in right-click plugin "Size Array Constants to Contents". It has a code that can size any constant array to its widest element:
It proceeds by creating a temporary constant of the same type as the array element, then trying each value of the array to find the one that takes the biggest width. It then moves the constant inside the array and rewrite some cosmetic properties like the number of rows/columns and scrollbar visibility back to their initial state.
Regards,
Raphaël.
12-15-2023 11:15 AM
Hi Raphaël,
Thanks for your time and for the content you shared. I will check those VI's you had shared.
If you don't mind, can you share me the downgraded version of the code (LabVIEW 2019 or 2020 fine), You sent me the latest LabVIEW version code. I tried to check it. For me the code was not opening since it is higher version than my current version.
Regards
Simha
12-15-2023 01:59 PM
12-15-2023 09:55 PM
Thank you very much Raphaël, I had implemented the same, it works, Good job