LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use EncloseSelection2? How to programmatically enclose selected objects with case structure?

Solved!
Go to solution

Hi,

I am trying to create a quick drop for enclosing selected block diagram objects with error case structure. I was trying to use Move Selected Objects Method at first without any success (the method was returning error code 1 no natter I tried). Then I found Enclose Selection 2 Method which is exactly what I need (based on the help). But it doesn't work... In the attachment you can find my test VIs. 

EncloseSelection2.png

Can anyone help me with this?

Michał Bieńkowski
CLA, CTA, CPI

  1. Did someone devote their time to help solve your problem? Appreciate it and give kudos.
  2. Problem solved? Accept as a solution so that others can find it faster in the future.
  3. Contribute to the development of TestStand by voting on the TestStand Idea Exchange.
Download All
0 Kudos
Message 1 of 5
(2,796 Views)
Solution
Accepted by bienieck

Ok, so the problem was that when a new object is created, the selection list is cleared.

Michał Bieńkowski
CLA, CTA, CPI

  1. Did someone devote their time to help solve your problem? Appreciate it and give kudos.
  2. Problem solved? Accept as a solution so that others can find it faster in the future.
  3. Contribute to the development of TestStand by voting on the TestStand Idea Exchange.
0 Kudos
Message 2 of 5
(2,753 Views)

Can you elaborate on how you worked around that?

 

Thanks,

Michael

0 Kudos
Message 3 of 5
(2,424 Views)

If you get the selection list before creating the object, you should be able to use that same array to set the selection list. Basically you're selecting the same items after it gets unselected.

Matt J | National Instruments | CLA
0 Kudos
Message 4 of 5
(2,412 Views)

FYI there's a right-click plugin for wrapping selected diagram code with an error case:

 

https://forums.ni.com/t5/LabVIEW-Shortcut-Menu-Plug-Ins/Wrap-in-Error-Structure-llb/ta-p/3524283

0 Kudos
Message 5 of 5
(2,407 Views)