NI Home > Community > NI Discussion Forums

LabVIEW

Showing results for 
Search instead for 
Do you mean 
Reply
Member
HackyJ
Posts: 14
0 Kudos

How can i conditionally execute code dependig to the LabVIEW Version (number and / or Type(Base,FD,prof))

I want to selectively change functionality depending on the LabVIEW Version (Base,FD,Prof).

How can i get the Version at runtime into a conditional disable structure?

Member
sgregor249
Posts: 60
0 Kudos

Re: How can i conditionally execute code dependig to the LabVIEW Version (number and / or Type(Base,FD,prof))

The App.InstalledPackage property returns a value representing the information you seek, however, this is a private property. You will need to use a case structure with this property as the selector, not a disable diagram structure. There may be a way to determine this with a different property. I won't tell you how to expose private properties beacuse I think NI frowns upon sharing this information (at least on this board [hint]).

 

 

Member
sgregor249
Posts: 60
0 Kudos

Re: How can i conditionally execute code dependig to the LabVIEW Version (number and / or Type(Base,FD,prof))

My image attachment was messed up and i couldn't find an edit button.

Active Participant
J.DECHET
Posts: 285
0 Kudos

Re : How can i conditionally execute code dependig to the LabVIEW Version (number and / or Type(Base,FD,prof))

Because it was already revealed in this forum, I recall by using 'SuperSecretPrivateSpecialStuff=True' in LabVIEW.ini, you could have access to method : App.License where your information is provided.

 

Moderators, don't hesitate to delete this post if needed.

Member
HackyJ
Posts: 14
0 Kudos

Re: Re : How can i conditionally execute code dependig to the LabVIEW Version (number and / or Type(Base,FD,prof))

Thanks a lot for this Informations.

The Problem is, that i want to downgrade a VI if there is no FD or Prof Installed.

I use some Math VI´s that shall not be linked if the Version is Base.

This is only possible with the disable Structure, not programmatically because the VI is not executable then.

 

 

Active Participant
J.DECHET
Posts: 285
0 Kudos

Re : How can i conditionally execute code dependig to the LabVIEW Version (number and / or Type(Base,FD,prof))

Perhaps an extrem soluce but you could try to extract used function, make dll with your call of unsupported routine. It's long, tiring, delicate, non evolutive but perhaps helped.

 

No more soluce, sorry.

Active Participant
F._Schubert
Posts: 1,534

Re: Re : How can i conditionally execute code dependig to the LabVIEW Version (number and / or Type(Base,FD,prof))

You also could call (or not call) them via VI Server. This way you won't need different executables (or distributions) for the Types and you won't get it broken...

 

Felix 

www.aescusoft.de
My latest community nugget on producer/consumer design
My current blog: A journey through uml
Member
sgregor249
Posts: 60
0 Kudos

Re: How can i conditionally execute code dependig to the LabVIEW Version (number and / or Type(Base,FD,prof))

Since you don't want code to be compiled based on installed package, like you said  a case structure won't work. It seems like in LV2009 you can only set conditional disable diagrams based on a combination of platform type (windows/embedded/etc.), proccessor bitness (32 bit / 64 bit) and run time engine (dev environment/executable), so conditional disable structure is out of the picture. The only solution I can think of would be to use a disable diagram structure, but this would only work if we could change what case is enabled at run-time. Does anyone know if there is a scripting property/method to change the enabled case of a disable diagram structure?
Active Participant
J.DECHET
Posts: 285
0 Kudos

Re : How can i conditionally execute code dependig to the LabVIEW Version (number and / or Type(Base,FD,prof))

[ Edited ]
Message Edité par J.DECHET le 01-22-2010 03:19 PM
Trusted Enthusiast
DFGray
Posts: 2,793
0 Kudos

Re: How can i conditionally execute code dependig to the LabVIEW Version (number and / or Type(Base,FD,prof))

The solution Felix suggested, calling a VI by reference, is probably your best bet.  If you make the front panels of the VIs identical, you can use an Invoke node and your execution time will be just barely effected.  You will want to load the VI during your initialization sequence.  I used this method extensively back when I was trying to support both Traditional DAQ and DAQmx instruments in the same application.  It works well.
Using LabVIEW 2011 - 2013 on Windows 7 64-bit