LabVIEW APIs Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Disable Diagram : Programatically select enabled frame

sgregor249 wrote:

Conditional disable only operates on a logical combination of platform / processor bitness (32 vs 64) / envorinment (dev/executable/etc.). If i want certain code to not compile based on other conditions I can use nested disable diagram structures or the call by reference node.

If you're interested, the full help article has a few more details.  Cheers!

Chris Bolin
LabVIEW Partner Program, CLA
0 Kudos
Message 11 of 17
(1,109 Views)

Thank you! Is there a way to programatically set the value of the custom symbol?

0 Kudos
Message 12 of 17
(1,109 Views)

I didn't find any properties nor methods of Project class (neither for ProjectItem class) reffering to disable symbols. At least in 8.2. But project file is XML...

0 Kudos
Message 13 of 17
(1,109 Views)

vugie wrote:

I didn't find any properties nor methods of Project class (neither for ProjectItem class) reffering to disable symbols. At least in 8.2. But project file is XML...

I don't know of a property or method either (in LV 2009).

You're right, there might be a <Property Name="CCSymbols" Type="Str">ThisIsYourCustomSymbol,ThisIsYourCurrentValue;</Property> in the XML ...but this would void the factory warranty and I can't offically recomend it

Chris Bolin
LabVIEW Partner Program, CLA
0 Kudos
Message 14 of 17
(1,109 Views)

I'm very curious to read a compelling case for why one would choose this method over a case structure. It seems like a lot of extra work for small reward. How much bigger is your compilation really if you simply used a CS instead of a DDS?

Is this a case of efficiency for efficiency's sake?

Finally, I am really not trying to seem rude here, I'm honestly curious and would like to learn what advantages I might obtain from doing the same myself.

-Evan

0 Kudos
Message 15 of 17
(1,109 Views)

If you call code or VIs that only exist on one platform or another then your VI will function cross platform.  If you make it a CS then the VI will be broken on all platforms.  This is important to those who code universally rather in their own little microcosm.

To be able to programmatically select the active Disable Structure may be useful to automate the cross platform development.

Cheers

LabVIEW ChampionLabVIEW Channel Wires

0 Kudos
Message 16 of 17
(1,109 Views)

My reason for this methadology is exactly what sth said. My curiosity on this subject was sparked at the following thread on the NI discussion forums where a user wanted to disable certain code that contained a mathscript node : http://forums.ni.com/ni/board/message?board.id=170&thread.id=469898&view=by_date_ascending&page=1 . The best solution that was offered was to use a call by reference node rather than nested disable diagram structures, but I was left wondering if it was possible to script. I ended up creating the attached implementation.

0 Kudos
Message 17 of 17
(1,109 Views)