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 Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
Eddie_Rickey

Copy Cases Between .vi's

Status: Declined

Any idea that has received less than 3 kudos within 3 years after posting will be automatically declined.

Yes I can select inside a case and copy what's inside to another VI, but why can't I just copy the whole case? This would enable me to copy a case to another VI without having to cleanup wiring and manually adding another case.

7 Comments
RavensFan
Knight of NI

How would you specify which case structure in another VI that the case goes to?  How would you specify in what order that case goes relative to the others?

 

How do you handle the tunnels?  Do you just add all the new tunnels, or does LabVIEW try to match up some of the tunnels with the new case with some of the existing tunnels in the case structure you are trying to paste into?

 

I can't think of a single occasion where I needed to copy a single case to another VI.  And if I did, there are so many other things about where to put the case and incorporate it that there is no way I would want LabVIEW to guess what I am trying to do since it would probably be incorrect.  The amount of effort to insert the new case manually, and copy the contents of the case from one to another is not so bad.  And wiring up some tunnels and doing wire cleanup is necessary since LabVIEW won't know how to do it itself.

Eddie_Rickey
Member

Great Point Ravens Fan.

 

In my case I have a State Machine used in several VI's, and all have the same tunnels. If I develop new Case, and now want to add that case to another vi, I have to select, copy, and paste. Seemed to me that it would be easier to just copy the case, and hook up my tunnels

 

Go Cowboys....

AristosQueue (NI)
NI Employee (retired)

I sincerely doubt that the times when two case structures have identical terminal structure are common enough to warrant a feature like this. Even if we count the cases where the types are all all the same but the locations have moved as "identical", I just don't expect it to be common. I suspect it would just be the kind of "essentially never used" pop up menu option that I don't like because it just makes the other pop up menu items hard to find.

Eddie_Rickey
Member

Love the positivity here....

 

Thanks Aristos

AristosQueue (NI)
NI Employee (retired)

*grin* Sorry, man, just offering my theory on the idea. It's still open for others to kudos.

SteenSchmidt
Trusted Enthusiast
I agree with Stephen though. Why not just select the code inside the case and copy and paste that into you other case structure? You'll have to rewire the whole deal anyway. Cheers, Steen
CLA, CTA, CLED & LabVIEW Champion
Darren
Proven Zealot
Status changed to: Declined

Any idea that has received less than 3 kudos within 3 years after posting will be automatically declined.