01-22-2010 09:57 AM
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!
01-22-2010 10:02 AM
Thank you! Is there a way to programatically set the value of the custom symbol?
01-22-2010 10:26 AM
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...
01-22-2010 10:59 AM
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
01-22-2010 03:33 PM
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
01-22-2010 05:58 PM
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
01-25-2010 07:04 AM
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.