Netlin 2.2
Slavik
Junior Member
I am very like the NetLinx. But I found some problem.If I define varible or struct in include file. I can not see this varible in all workspace.
What I have to do for see this varible in all my workspace?
What I have to do for see this varible in all my workspace?
Comments
-
If you put the DEFINE_TYPE keyword at the top of your include, your #INCLUDE line should be right at the top of your code, before the DEFINE_DEVICES section. The same goes for whatever other types of variables you are trying to include. YOu must do it this way if your include has multiple sections (ie., DEFINE_CONSTANT and DEFINE_VARIABLE together, etc.). If it only contains one type of item, do not place the DEFINE_* keyword(s) in there at all, and put your #INCLUDE line in the appropriate section.
-
I am not certain it is THAT strict, but it certainly wants an element defined before you use it. In my experience you can pretty much include a file anywhere, but it should contain the appropriate DEFINE_XXX for what you're defining, and nothing of the file is usable (in the main program) before the file is #included.
The only thing NetLinx finds no matter where defined are functions (that is, function A can call function B defined below function A). It also seems pretty relaxed about which section functions are defined in.
But variables, constants, devices, STRUCT, etc must be defined before they are used (from top to bottom) and in the appropriate section (that can appear twice or more times).
Hope this helps
Fred
Categories
- All Categories
- 2.5K AMX General Discussion
- 922 AMX Technical Discussion
- 514 AMX Hardware
- 502 AMX Control Products
- 3 AMX Video Distribution Products
- 9 AMX Networked AV (SVSI) Products
- AMX Workspace & Collaboration Products
- 3.4K AMX Software
- 151 AMX Resource Management Suite Software
- 386 AMX Design Tools
- 2.4K NetLinx Studio
- 135 Duet/Cafe Duet
- 248 NetLinx Modules & Duet Modules
- 57 AMX RPM Forum
- 228 MODPEDIA - The Public Repository of Modules for Everyone
- 943 AMX Specialty Forums
- 2.6K AMXForums Archive
- 2.6K AMXForums Archive Threads
- 1.5K AMX Hardware
- 432 AMX Applications and Solutions
- 249 Residential Forum
- 182 Tips and Tricks
- 146 AMX Website/Forums