03-07-2016 02:39 AM
Hello,
Moving from the home PC to the "at work" one and then opening a VI that I worked at home I've been mistaken with assigning correct .ctl file to "case structure" type.
Is it possible to repaire this error without redefining manually "case structure" type (e.g. reload in some way the correct .ctl)
Thanks in advance.
Pavel
03-07-2016 03:01 AM - edited 03-07-2016 03:01 AM
Hi Pavel,
what is a "case structure" type?
When the ctl-file for a typedefined control/constant is missing you can disconnect the control/constant from the typedef to "repair" your VI. After disconnection you can create a new typedefinition from the control/constant…
Moving from the home PC to the "at work" one
You should rethink your "move" process!
The general suggestion is to use a SVN tool (subversion, GIT) to synchronize sources between several computers.
The LabVIEW specific suggestion is to use a proper project file and folder. When "moving" to a different computer you should create a build spec to export the whole project as ZIP file…
03-07-2016 03:25 AM
Hi GerdW,
Thanks for suggestions. Sure, I'll follow them.
The issue is a little bit more complicated than I descibed above - I forgot the correct .ctl file at home.
So, I edited the old version that I have on my work PC and upon opening the VI and LabView avertissement that correct .ctl isn't find, I provided the new .ctl.
Anyway is it possible to "reassign" a new .ctl to enum type if I discover one day that states (their number and theirs names) in state machine need to be modified.
Best Regards
Pavel.
03-07-2016 03:55 AM
Hi Pavel,
is it possible to "reassign" a new .ctl to enum type if I discover one day that states (their number and theirs names) in state machine need to be modified.
In this case you simply edit the typedefiniton of the ENUM: it's the main purpose of the typedefinition to have one instance you need to edit to apply the changes to all instances in your code!
03-07-2016 04:08 AM
@Pavel_47 wrote:Hi GerdW,
Anyway is it possible to "reassign" a new .ctl to enum type if I discover one day that states (their number and theirs names) in state machine need to be modified.
Replace or update the .ctl file. LV looks for a .ctl of a certain name, it'll use what it finds with that name, right or wrong.
/Y
03-07-2016 05:26 AM
GerdW a écrit :Hi Pavel,
is it possible to "reassign" a new .ctl to enum type if I discover one day that states (their number and theirs names) in state machine need to be modified.
In this case you simply edit the typedefiniton of the ENUM: it's the main purpose of the typedefinition to have one instance you need to edit to apply the changes to all instances in your code!
In a case when I have another .ctl (e.g. used in another project) that I want to integrate into VI, the simplest way to do it is to rename this .ctl. Correct ?
03-07-2016 08:30 AM
First, I really hope you are using LabVIEW Project to manage all of your VIs and Controls/Typedefs. If you have a reference to a Typedef called "Type1.ctl" in your code, and you move the code (without the Typedef) to another computer that lacks this Typedef, your code will "break", obviously. Suppose the other computer has a Typedef called "Type2.ctl". If you want to use this on the second computer, you have two choices -- you can rename the Control to "Type1.ctl" and make sure you code can find it (having it in the Project file makes this simple), or you can find all of the calls in your code to "Type1" and change them to "Type2".
Depending on your particular circumstance, there might be good arguments for either scenario. The bottom line is that LabVIEW will look for Controls and VIs based on the name of the file, but once it finds it and makes the "logical" connection, it better find "what it needs" there. [I hope you understand what I'm trying to say -- just because you've renamed a Control or a VI to have the same name as a VI on another machine doesn't mean the internals of the Control or VI are the same, and thus will "work"].
Bob Schor
03-07-2016
08:42 AM
- last edited on
05-14-2025
09:29 AM
by
Content Cleaner
@Pavel_47 wrote:
Hello,
Moving from the home PC to the "at work" one and then opening a VI that I worked at home I've been mistaken with assigning correct .ctl file to "case structure" type.
Is it possible to repaire this error without redefining manually "case structure" type (e.g. reload in some way the correct .ctl)
Thanks in advance.
Pavel
Pavel- You sure do get into a lot of trouble! Take the advice about a proper SCC system seriously.
Now, How to "Fix it" the easy way
With the Main VI open selecu menu View>>VI Hierarchy Make sure you show controlls- the help file explains what ribon bar glyps do what-
Then Ctrl+F will open the "Find dialog" Search the application instance of your project for "Bad Control.ctl" and hit "Find" in the search results window you can replace each or all instances of "Bad Control.ctl" with "Control I Forgot To Bring Home.ctl"
Save All - write your self a note to not do that again.