Crestron Studio® provides functionality to utilize user-created SIMPL# libraries in Crestron Studio® systems. Note that SIMPL# libraries are NOT imported using the standard import functionality in Crestron Studio®. Instead, SIMPL# libraries should be referenced in a new or existing SIMPL+ module(s).
IMPORTANT: The SIMPL# library and the SIMPL+ module referencing the library cannot have the same name. If they do, compilation error will occur!
To start using a SIMPL# library in a Crestron Studio® system:
Create new or open existing SIMPL+ module. Make sure that the name of the module differs from the name of the SIMPL# library.
Copy the SIMPL# library file (extension .clz) to the same folder
where the SIMPL+ module is located.
Central SIMPL+ modules reside in 'C:\Users\Public\Documents\Crestron\Tools\Modules'.
Project specific SIMPL+ modules are saved in 'C:\Users\USER_NAME\Documents\Crestron\Projects\Systems\SYSTEM_NAME\Modules\'.
Reference the SIMPL# Library within the SIMPL+ module by using
the SIMPL+ compiler directive #USER_SIMPLSHARP_LIBRARY
"library_name"
in the 'Include Libraries' section of the SIMPL+ module.

Note that "library_name"
is the name of the SIMPL# library without the file extension.
For example, #USER_SIMPLSHARP_LIBRARY
“MyLibrary” references MyLibrary.clz.
NOTE: The name of the SIMPL#
library cannot include relative or absolute paths. Additionally, Crestron
recommends that the compiler directive #INCLUDEPATH is not used in SIMPL+ modules
utilized in Crestron Studio® as referencing paths
outside of the Central and Project databases may break dependencies
during module export.
Call and use class' functions and variables from the SIMPL# library in your SIMPL+ module
Compile and use the SIMPL+ module.
All public classes and their public class members (variables, methods and properties) in a SIMPL# Library are exposed to the SIMPL+ module so you can create variables of this class type in your SIMPL+ module and then call and use the class’ functions and variables as needed..
To access a class defined in the SIMPL# library and call its methods and properties from a SIMPL+ module:
SIMPL+:
function InitializeSimplSharpObjects()
{
Class1 myClass; // instantiate a variable of SIMPL# class in the SIMPL+ module
SIGNED_LONG_INTEGER ID;
ID = myClass.GetID();
}