07-17-2015 08:26 AM
Is there a way to deselect objects from a selection using scriptin? I have a VI and I want to remove all code that isn't controls, cleaning the block diagram. I thought I could perform a Select all on the block diagram, deselect the control terminals, then invoke a delete, but I don't see a way to deselect objects. Is this a gap in scripting where it should be implemented? Or did I miss it?
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
Solved! Go to Solution.
07-17-2015 09:18 AM
The only way I see to do this would be to get the selection list, index through the list to remove the controls, then make a new selection out of the remaining elements.
My understanding is that a selection is just an array of BD objects so I'm not sure what a deselect would really be besides removing it from the array.
07-17-2015 10:25 AM
Yup while working through it this was the only solution I came up with that worked. Get All Objects from the BD, the perform an Equal on the control terminal references, and if they are the same remove that reference from the array of All Objects (or conditional indexing) then use that selection. Still I figured there would be a deselect but this works just fine.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
07-17-2015 10:30 AM
Wiring False to the Selected property doesn't count?
07-17-2015 10:44 AM
@Darin.K wrote:
Wiring False to the Selected property doesn't count?
Oh it does, didn't think of that either.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord