From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to prorammatically move a control out of a case structre

Solved!
Go to solution

Hello, I have to programmatically move a control out of a case structure, when i try it, it makes the case structre bigger and keeps the control inside. Would be great if someone could help me fixing this, if it is possible. 

Here is a pic of my test vi blockdiagramm.

Seau1_1-1585299429868.png

 

0 Kudos
Message 1 of 16
(2,816 Views)

You need to change the owner of the item from the While structure to the Block diagram.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 2 of 16
(2,789 Views)

Thank you very much for the fast answer, sadly the Owner property is read-only, is there another way to change the owner? 

Seau1_0-1585306882346.png

 

 

0 Kudos
Message 3 of 16
(2,779 Views)

You can delete the terminal and create a new one on the Top diagram, and in this case it'll be easy. If you have connected wires it'll be a mess though. Why are you doing this? 🙂

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 4 of 16
(2,767 Views)
Solution
Accepted by Seau1

So: You cannot change owner from the same VI that runs, you must edit an inactive VI.

The function you missed is Invoke node - Move. That both moves and changes owner.

Script.png

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 5 of 16
(2,761 Views)

@Yamaeda wrote:

You can delete the terminal and create a new one on the Top diagram, and in this case it'll be easy. If you have connected wires it'll be a mess though. Why are you doing this? 🙂

/Y


You also loose connectivity to the connector pane. This is really a lot of work to fix.

0 Kudos
Message 6 of 16
(2,755 Views)

wiebe@CARYA wrote:

@Yamaeda wrote:

You can delete the terminal and create a new one on the Top diagram, and in this case it'll be easy. If you have connected wires it'll be a mess though. Why are you doing this? 🙂

/Y


You also loose connectivity to the connector pane. This is really a lot of work to fix.


Then i found the Move-command. That solves a lot. 🙂

 

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 7 of 16
(2,752 Views)

@Yamaeda wrote:

wiebe@CARYA wrote:

@Yamaeda wrote:

You can delete the terminal and create a new one on the Top diagram, and in this case it'll be easy. If you have connected wires it'll be a mess though. Why are you doing this? 🙂

/Y


You also loose connectivity to the connector pane. This is really a lot of work to fix.


Then i found the Move-command. That solves a lot. 🙂


Yes, that should be marked as solution, IMO.

 

I had the CP problem when moving all diagram code into a structure.

0 Kudos
Message 8 of 16
(2,746 Views)

Just curious - and you don't need to answer this - but what is the purpose of doing this programmatically?  It's just for my personal knowledge, in case I run into a similar situation.

 

Thanks!

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 9 of 16
(2,714 Views)

Thank you very much for the help, I will try your solution as fast a possible. I need this because I have to fix a VI Generator which saves the controls and indicators inside of diagramms.

0 Kudos
Message 10 of 16
(2,646 Views)