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: 

Disconnect all instances of typedef

Solved!
Go to solution

I am ashamed but... cannot find a way to do a simple task.

 

How can type definition be disconnected from all its instances? Search then disconnecting one by one with pop-up menu is somehow boring/time-consuming.

 

A script can be written and do the job but there is probably a better way without discovering a wheel.

 

Thank you!

_____________________________________
www.azinterface.net - Interface-based multiple inheritance for LabVIEW OOP
Message 1 of 13
(4,964 Views)
Solution
Accepted by topic author _Y_

hi,

I just tried this and its working.

in block diagram Right click on Typedef control 

select open typedef

in the dropdown box change typedef to only control

save. 

bp
Message 2 of 13
(4,943 Views)

Thank you bharathp10, this is simple:)

 

The next problem is identifying which VI-s must be saved after redefining of CTL. So long as such a VI is not saved, it expects presence of the same CTL file. However, this problem is related to a more common one: VI-s in a project do not know abount changes of theirs sub-VIs/CTL-s.

 

Thank you

_____________________________________
www.azinterface.net - Interface-based multiple inheritance for LabVIEW OOP
0 Kudos
Message 3 of 13
(4,928 Views)

Hi Y,

 

VI-s in a project do not know abount changes of theirs sub-VIs/CTL-s.

Wrong.

As long as you work inside the project all VIs know about changes of their subVIs/CTLs!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 13
(4,919 Views)

Hi Y,

As GerdW  said the changes will be reflected in all other vi's inside project.

If you want some VI's to use typedef & disconnect from other VI's ,

open only the VI you want to remove typedef, open the control, change from typpedef to control, click close(X),  and don't save. which disconnects from current VI and keeps the typedef in other VI's

I tested it on LV2011.

 

bp
0 Kudos
Message 5 of 13
(4,910 Views)

Hi Y,

As GerdW  said the changes will be reflected in all other vi's inside project.

If you want some VI's to use typedef & disconnect from other VI's ,

open only the VI you want to remove typedef, open the control, change from typpedef to control, click close(X),  and don't save. which disconnects from current VI and keeps the typedef in other VI's

I tested it on LV2011.

bp
0 Kudos
Message 6 of 13
(4,909 Views)

Unfutunately it is not wrong. Only VI-s in memory "know" about changes.

 

This is a simple test:

1. Create project with one typedef and one VI

2. Place the typedefined control in the VI

3. Save all

4. Close the project

5 Open the project again

6. Open the typedef (DO NOT open the VI)

7. Change typedef to control

8. Save all from menu or project toolbar

9. Close the project.

10. Delete the CTL file from hard disk (or rename).

11. Try to open the VI from hard disk. The VI will search for missed CTL file.

_____________________________________
www.azinterface.net - Interface-based multiple inheritance for LabVIEW OOP
0 Kudos
Message 7 of 13
(4,899 Views)

@_Y_ wrote:

Unfutunately it is not wrong. Only VI-s in memory "know" about changes.



@GerdW wrote:
As long as you work inside the project all VIs know about changes of their subVIs/CTLs!

As GerdW says, you have to be inside the project, meaning the VIs are loaded into memory. 

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 8 of 13
(4,874 Views)

No, there is a misunderstanding here. VI-s in a project are not loaded in memory. They are loaded ONLY when opened. This is the point. VI-s do not know about changes in typedef as long as they are not opened.

_____________________________________
www.azinterface.net - Interface-based multiple inheritance for LabVIEW OOP
0 Kudos
Message 9 of 13
(4,861 Views)

@_Y_ wrote:

Unfutunately it is not wrong. Only VI-s in memory "know" about changes.

 

This is a simple test:

1. Create project with one typedef and one VI

2. Place the typedefined control in the VI

3. Save all

4. Close the project

5 Open the project again

6. Open the typedef (DO NOT open the VI)

7. Change typedef to control

8. Save all from menu or project toolbar

9. Close the project.

10. Delete the CTL file from hard disk (or rename).

11. Try to open the VI from hard disk. The VI will search for missed CTL file.


Again, you are not working from within the project when you open the VI from the hard disk.  

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 10 of 13
(4,833 Views)