03-12-2021 11:19 AM
I need to change the VISA class of VISA Reference controls on dozens of VIs from "I/O Session -> Instr" to "I/O Session -> Serial Instr". I was hoping to build a scripting tool to do it, but don't see this property exposed by LV Scripting. Anyone know where I can find it, or can confirm it's not available? I see the Undo system can reverse changes to this (referring to it as "Undo Change Attribute"), so I suspect it's out there, just not obviously so.
Thanks,
Erik
03-12-2021 11:31 AM
I'm not superfamiliar with how VISA refs work, but in the palettes aren't they all separate controls? So instead of changing an attribute, maybe you should be looking at replacing the control with the correct one?
Just a thought
03-12-2021 12:20 PM
Hi Sam,
No, they're a unified control, unfortunately:
At least, if they're not, NI's doing a good job disguising it!
It's rather annoying when I run into a project where they're left at "instr" when it's not necessary (and I haven't yet run into one where it was) as it leaves out what IMHO is useful functionality - especially with probes - that is added for the "Serial Instr" type.
Thanks,
Erik
10-27-2021 06:38 AM
Please try with attached VI.
It will convert all VI Resource Name available on FP to Class Name you have Mentioned. You can provide either I/O session names or Event Class Names.
10-27-2021 10:04 AM
Hi Jalel,
Sorry, no, it doesn't seem to be working. I tried it on a VI with both a VISA Refnum control and indicator, both of class "I/O Session -> Instr", and tried to change them to "Serial Instr" and neither changed. The converter VI didn't throw an error either.
Please unlock the VI you next post. I prefer not to run anything that I can't see the source code behind unless it's from a trusted source, and you're not a trusted source, sorry! If the next version you post is password-locked, I won't be running it.
Thanks,
Erik