LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Impact of changing ctl file extension

Solved!
Go to solution

I recently inherited a large amount of LabVIEW code. All throughout the files I noticed that the previous developer had changed the default file extension for controls & typdefs from ctl to vi. Never mind trying to understand why they would have done this, ugh! I have considered hunting them down and changing them back but this is a large undertaking. I am concerned about this coming back to bite me down the road. So the question - is there any known negative repercussions to changing the file extensions of ctl file to vi?

0 Kudos
Message 1 of 18
(3,066 Views)

It does not make sense to change the extension to VI in the first place, then if you changed to VI, I don't think LabVIEW will detect it as neither a VI nor a control, really, no clue why it was done and whether it works.

 

The right thing to do is, if it works, leave it as such.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 2 of 18
(3,062 Views)
Solution
Accepted by topic author EduNI

LabVIEW itself is largely file ending agnostic. It originated on the Mac which had way more advanced techniques even more than 30 years ago, than tacking a three (or more) letter file ending on a file name to associate files with applications. So almost all the LabVIEW files use an internal binary file structure with a header that says very specifically to LabVIEW what the file really is. If you call it MyGreatest.vi, MyGreatest.bullshit or MyGreatest.idea, makes no difference to LabVIEW.

 

That all said, the world has since largely moved to associate files to certain applications by file ending. That may have also influenced some tools on the edge of the LabVIEW universe to somehow rely on file endings. But the core LabVIEW system really couldn't care about file endings less.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
Message 3 of 18
(3,056 Views)

@EduNI wrote:

I recently inherited a large amount of LabVIEW code. All throughout the files I noticed that the previous developer had changed the default file extension for controls & typdefs from ctl to vi. Never mind trying to understand why they would have done this, ugh! I have considered hunting them down and changing them back but this is a large undertaking. I am concerned about this coming back to bite me down the road. So the question - is there any known negative repercussions to changing the file extensions of ctl file to vi?


Those are NOT CONTROLS!  they are Global.vis. Don't change the extensions!

 

Now, it is highly possible that the original developer abused those Globals (probability very near unity and, I don't even have to ask you to post a code example).  Hunting down the usage (Use the hierarchy view) and refactoring the code should be high on your "To-Do" list. 

 

Hunting down the original author can be very satisfying but, make sure you can escape legal action.


"Should be" isn't "Is" -Jay
Message 4 of 18
(3,054 Views)

@JÞB wrote:
Those are NOT CONTROLS!  they are Global.vis. Don't change the extensions!

How can you possibly come to that conclusion from the information given?

IMHO, the post was very specific about "controls & typdefs", i.e. not globals.)

0 Kudos
Message 5 of 18
(3,025 Views)

@altenbach wrote:

@JÞB wrote:
Those are NOT CONTROLS!  they are Global.vis. Don't change the extensions!

How can you possibly come to that conclusion from the information given?

IMHO, the post was very specific about "controls & typdefs", i.e. not globals.)


I did not.  Wanna bet?  Since both Global.vis and Controls can be independently filtered in the Hierarchy view, it will be simple to test irrespective of the file extension. 😀


"Should be" isn't "Is" -Jay
0 Kudos
Message 6 of 18
(3,013 Views)

@JÞB wrote:
, it will be simple to test irrespective of the file extension. 

I cannot test, because I don't have the relevant code. Once we do, we can be sure. 😄

0 Kudos
Message 7 of 18
(2,997 Views)

@altenbach wrote:

@JÞB wrote:
, it will be simple to test irrespective of the file extension. 

I cannot test, because I don't have the relevant code. Once we do, we can be sure. 😄


It speaks to my general philosophy about all of us silly humans.  I simply asked myself; "How Braindamaged would a developer have to be to change all ctl file extensions?" And, "Could such a brain have the capacity to execute that change?"

 

The alternative was to reject that the extensions were intentionally changed and substitute that the OP was seeing something else in the project that was recently inherited. 

 

Yea! OCCAM


"Should be" isn't "Is" -Jay
Message 8 of 18
(2,986 Views)

The OP is registered here for almost 6 years, i.e. not a newbie, so I reject these assumptions. We might never find out though. 😄

0 Kudos
Message 9 of 18
(2,974 Views)

@JÞB wrote:

@altenbach wrote:

@JÞB wrote:
, it will be simple to test irrespective of the file extension. 

I cannot test, because I don't have the relevant code. Once we do, we can be sure. 😄


"How Braindamaged would a developer have to be to change all ctl file extensions?" 

 

The alternative was to reject that the extensions were intentionally changed and substitute that the OP was seeing something else in the project that was recently inherited. 

 

Yea! OCCAM


How brain damaged? Certainly an interesting question!  I have no clue why the original developer would have done this.

Seeing something else? I didn't imagine it. I discovered it by clicking on a .vi file and it opens up as a typedef.

2022_02_12_14_58_52_Status_Bitfield_Typedef.vi.jpg

You don't need code to test this. Just find any .ctl file in any existing project, use file explorer to change the extension to .vi, then open the project. Everything seems to behave and run without a hitch. See the answer by rolfk, it seems to explain why it works and that it should be ok going forward. 

Message 10 of 18
(2,972 Views)