LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Path Typedef does not update

Solved!
Go to solution

Hi, I have a problem while using my path Typedef.

I have buildt a Library, which uses a .dll to send commands via a Bus.

Because I have used the call Library function node, I needed to create a Typedef with a Path, so I can maintain the Library better.

 

Since I have changed the Path of the .dll File, the VI wont work. So I wanted to change the Typedef.

But every time I change tha Path within the Typedef, the VI fails, because for some reason the Typedef is still set to the old path.

I dont know what to do, I even deleted and overwritten the Typedef to change the Path to the new one.

I even set the new path to default but the old path still appears. 

 

Currently I can safe my Type def but the Apply Changes button is grayed out.

 

Can somone help me?

 

TikeMyson_0-1655979207174.png

 

0 Kudos
Message 1 of 3
(118 Views)
Solution
Accepted by topic author TikeMyson

@TikeMyson wrote:

Hi, I have a problem while using my path Typedef.

I have buildt a Library, which uses a .dll to send commands via a Bus.

Because I have used the call Library function node, I needed to create a Typedef with a Path, so I can maintain the Library better.

 

Since I have changed the Path of the .dll File, the VI wont work. So I wanted to change the Typedef.

But every time I change tha Path within the Typedef, the VI fails, because for some reason the Typedef is still set to the old path.

I dont know what to do, I even deleted and overwritten the Typedef to change the Path to the new one.

I even set the new path to default but the old path still appears. 

 

Currently I can safe my Type def but the Apply Changes button is grayed out.

 

Can somone help me?

 

TikeMyson_0-1655979207174.png

 


A Typedef stores the type (and in case of a strict typedef the appearance of the type) but not the value. The value you define in a typedef is only used as default value when you create a new instance of that type in a VI. What is the actual default data value is stored in the VI that makes use of the typedef.

 

Typedefs are not meant to define values, but the type of a control! You should rather create a simple VI with a Path constant inside and return that constant value through a VI connector and use that one. That way you have one single location that determines the value of your path and can change that at any time later by editing this subVI.

 

It also makes your call VI simpler. Unless you design some very specific plugin mechanisme with multiple DLLs implementing the same API, the user of your VI shouldn't really be bothered about what DLL you want to call. That is all private details of your VI interface and specific to the DLL you interface to. You do not want a user of your library to mess with that at all.

 

Rolf Kalbermatter
Averna BV
0 Kudos
Message 2 of 3
(106 Views)

Hi Rolf

 

I see, therefore I misunderstood the use of a typedef for way to long.

Thank you very much for your solution.

 

Cheers,

Fabian

0 Kudos
Message 3 of 3
(87 Views)