-
Open NetLinx Studio and go through the
Workspace Wizard
. When it comes to theMaster Source Code File Selection
screen, chooseAdd the Master Source Code File later
. -
Add the project folder to Sublime Text:
Project
->Add Folder to Project...
-
Select
NetLinx: New From Template: Overview
from the Command Palette (ctrl + shift + p) orTools
->Command Palette
. -
Fill in the header and program name, then save the .axs file. This file will contain includes to device and touch panel files, but typically shouldn't do any of the heavy lifting itself.
-
Create a folder named
include
. This is where the device and touch panel code will reside. Breaking up functionality into different files makes it easier to maintain a complex system, as well as reuse those components in other systems. -
Select
NetLinx: New From Template: Include
, fill in the header for one of the devices (touch panel, for example), change the include guard (#if_not_defined
) to a project-unique name, and save the file in theinclude
folder. Code does not need to be written yet. -
Repeat step 6, adding an include file for each logical component of the system. Subfolders may be necessary for complex projects.
-
Add the appropriate
#include
declarations to the .axs source code file. -
In NetLinx Studio, add the .axs file as an existing source file and set it to
Master File
. Add the .axi include files as existing include files. -
Press
Build Active System
as a sanity check to make sure the workspace is set up correctly. Since no source code has been written at this point, any errors will be problems with files that haven't been included correctly. Fix the errors, if any. -
Close NetLinx Studio. At this point the source code can be written in Sublime Text.
-
With the .axs or include file open in Sublime Text, build the file (ctrl + b) or
Tools
->Build
. -
The project should compile. If it doesn't, verify the installation of Ruby and netlinx-compile.
-
Begin programming.