LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

can you "connect" a control to an existing type def?

Solved!
Go to solution

I know I can disconnect a control from a type def, but can I "connect" (link) a control to an existing type def?

 

I'm trying to do this because sometimes I have a customized control that I've made by editing picture items, sizes colors and fonts and so on, and I'd like to use it in another project. I can copy it over easily enough, but how the heck do I link it to the existing type def in the other project?

 

-root


global variables make robots angry


0 Kudos
Message 1 of 8
(7,786 Views)
Solution
Accepted by topic author Root_Canal

I can suggest the following:

1) make a copy of the customized control (I guess it's a .ctl) in a new directory

2) open the ctl and resave it as a typedef with the same name of the typedef in the other project

3) create a new vi pasting a control (now typedef) on the front panel

4) copy the vi (not the ctl) to the other project and open it: the control should "connect" to the existing typedef

Of course, be very careful not to overwrite any existing file.

 

Message Edited by pincpanter on 03-20-2009 05:20 PM
Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
Message 2 of 8
(7,779 Views)
The easiest way to replace an existing control with a type definition is to right-click on the control border in the front panel, click Replace->Select a Control... and find your type definition.  Does that achieve what you want?  Make sure you're using strict type definitions if you're modifying colors and other appearance properties.
Message 3 of 8
(7,755 Views)

nathand wrote:
The easiest way to replace an existing control with a type definition is to right-click on the control border in the front panel, click Replace->Select a Control... and find your type definition.  Does that achieve what you want?  Make sure you're using strict type definitions if you're modifying colors and other appearance properties.

That is the method I use but be DAMN sure you you are pointing at the right widget in the right folder to avoid cross linking etc.

 

THe big plus with doing the replace is that it takes care of all property nodes and events cases as well.

 

Ben

 

PS: Nice signature! Let's keep them robots happy.

Message Edited by Ben on 03-20-2009 01:19 PM
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 4 of 8
(7,748 Views)

Ahhhh! nicely done, pink panther! the ol' switcharoo. I tried the other method listed. I might be doing something wrong, but using "replace" wiped out some of the custom settings on the control.  pincpanter's method seems to work fine, though. thanks!

 

-root

Message Edited by Root Canal on 03-20-2009 01:32 PM

global variables make robots angry


0 Kudos
Message 5 of 8
(7,738 Views)

Hello Pincpanter,

I am new to Labview and I'm trying to add a control to an existing type def.

 When you say  the following - 

3) create a new vi pasting a control (now typedef) on the front pane

 (Are we creating the new vi  within the current project?)

 

I am asking because I get conflicts within the project if I open a new VI inside project explorer. 

 

Thank you for your response 

0 Kudos
Message 6 of 8
(4,786 Views)

Hi dhenry,

 


@dhenry wrote:

Hello Pincpanter,

I am new to Labview and I'm trying to add a control to an existing type def.

 When you say  the following - 

3) create a new vi pasting a control (now typedef) on the front pane

 (Are we creating the new vi  within the current project?)

 

I am asking because I get conflicts within the project if I open a new VI inside project explorer. 


Which kind of "conflict" do you get when you create a new VI "inside project explorer"?

Best regards,
GerdW


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

Thanks for your reply GerdW - I realize this was a post from 2009 so I'm not sure if it applies to LV 2018 

Here are the steps I followed according to the post - 

1) make a copy of the customized control (I guess it's a .ctl) in a new directory

2) open the ctl and resave it as a typedef with the same name of the typedef in the other project

3) create a new vi pasting a control (now typedef) on the front panel

(Here is where I'm getting the conflict)

Conflict Image.JPG

When I name the control the same name as the typedef as suggest by the post, this is the conflict that I am getting.

4) copy the vi (not the ctl) to the other project and open it: the control should "connect" to the existing typedef

 

This is a practice VI before I perform the action on the actual program.

 

0 Kudos
Message 8 of 8
(4,742 Views)