03-27-2020 03:58 AM
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.
Solved! Go to Solution.
03-27-2020 05:23 AM
You need to change the owner of the item from the While structure to the Block diagram.
/Y
03-27-2020 06:01 AM
Thank you very much for the fast answer, sadly the Owner property is read-only, is there another way to change the owner?
03-27-2020 07:05 AM
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
03-27-2020 07:28 AM
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.
03-27-2020 07:59 AM
@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.
03-27-2020 08:19 AM
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. 🙂
03-27-2020 08:45 AM
@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.
03-27-2020 11:51 AM
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!
03-30-2020 12:39 AM
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.