Conditionally include a Module
Morris
Posts: 21
Hi AMX Forum people,
I was wondering if it was possible to conditionally include a module?
Something like:
if(true)DEFINE_MODULE blah blah
This doesn't work though.
The compiler directives do not include a #IF only #IF_DEFINED etc
Thanks for any suggestions
I was wondering if it was possible to conditionally include a module?
Something like:
if(true)DEFINE_MODULE blah blah
This doesn't work though.
The compiler directives do not include a #IF only #IF_DEFINED etc
Thanks for any suggestions
0
Comments
If you want to find out more about the process, check out the term 'Dynamic Binding' in the Netlinx Studio > Netlinx Keywords Help section.
I have no idea what the valid deviceType's are and what should go in the friendlyName. Does anyone have a good example of this. This documentation doesn't specify.
Thanks,
Javed
While that's true it allows you to do whatever you could do with an #IF as well. Let me make an example: all my include files start with something like
This way I can include my include files whenever I want without having to bother about multiple definitions or similar nasty stuff.
So you can use something like
Hi Javed,
I'm just now looking into this, and found a list of the deviceTypes - they're listed in the help under DDD - Device SDK Classes and Constants. Hope that helps (if you had not found it already). The 'friendlyName' I'm not sure about but think it's just a definition that you make for your self.