01-06-2015 03:48 PM
Oh no - I was hoping to be able to avoid this ClassName-string CaseStructure-thing...
Would there be any issue with data types other than numeric in terms this reverting to a "standard representation"? For string possibly the different display styles or something?
01-07-2015 06:22 PM
I put together a version of this plugin that shouldn't have any issues with the new item losing configuration. I apologize for the code messiness and lack of comments, I only had a little while to put this together.
It's saved in LabVIEW 2013. Place these files in your Quick Drop plugins directory. The default shortcut is Ctrl-J.
01-08-2015 04:34 AM
Nice one! Had trouble understanding the temporary CTL, but that's really smart stuff!
01-08-2015 11:55 AM
Thanks. The smarts of the scripting code came from my colleague AristosQueue... I just massaged his code into a Quick Drop shortcut.
01-10-2015 06:08 PM
Just found out that the new shortcut VI had trouble with Arrays existing TypeDefs. It can convert TypeDefs into an array no problem, but the reverse action gives an error 1154 when trying to replace the array with the array element from the newly created object in the temporary CTL... I inserted a case structure that passes the path of the TypeDef instead of the temporary CTL path whenever this function has to deal with an array of a TypeDef. Seems to do the trick.
Please find the llb with the modified subVI in question ("Execute Change To Array Or Element.vi") attached. Replace it with the existing "_ChangeToArraySupport.llb" in the "LabVIEW 201*\resource\dialog\QuickDrop\plugins" folder.
01-12-2015 01:08 PM
Thanks for discovering the issue and posting a fix, comrade.
07-14-2016 09:32 AM
This QD shortcut stopped working in my LV2013 64bit today. I tested in x86-LV2013 - all fine.
I replaced the VIs / the LLB in my QD folder with the ones that are posted here to make sure nothing has gone wrong with my copies on the computer. Still no joy. At least I found the eventual cause: The Move method positioning the newly created array control throws an error 1055, which is an invalid object reference. As the Controls property yields a non-empty array (notice the "#1" from highlight mode within the property node) there could actually not be an invalid reference, as the first element is indexed and control references are never closed while LabVIEW is running, even when being told so.
I tried a restart of LabVIEW several times, but to no effect.
Has my Labview installation gone bad?
I appreciate any hints as to what to do.
07-14-2016 03:15 PM
I don't know what the problem could be. I have the shortcut saved in my [LabVIEW Data]\Quick Drop Plugins folder so that it's accessible in all of my LabVIEW installations. I tried it in several installs (including LabVIEW 2013 64-bit), and it worked fine...it converts a numeric constant to an array of numerics constant, and does the reverse as well.
07-15-2016 02:04 AM
My problem does not show with constants but with controls only. And only with LV2013 64bit. Even with 64bit it worked well until yesterday.
I just tested constants back and forth and they seem to work fine, also replacing array controls with their scalar counterparts is ok. The behaviour only applies to replacing scalar controls/indicators with an array.
As for your answer - I am forced to conclude that my LabVIEW installation is corrupted somehow. Disturbing though this may be - I doubt I will go through the hassle of repairing or reinstalling my 64bit LabVIEW and possibly having to reinstall all drivers for them to be recognized by the new installation just for one QD shortcut.
Thanks for caring, Darren.
07-15-2016 01:31 PM
Wow, I really have no idea. I got controls and indicators to work fine in LabVIEW 2013 64-bit. Is this reproducible for you just from dropping a numeric control in a blank VI, or can you only reproduce it with a specific control/indicator in a specific VI? And if so, can you post that VI (or a reasonable facsimile) here?