One liner.
Reference → Modules →Scripts → UI → Code Editor | Classes | Expressions | Monitor | References | Tasks
Script References (Reference) enables adding external DLLs (Dynamic Link Libraries) to extend the capabilities of scripts and display codes in your solution.
Framework Compatibility:
Script References allow you to:
Table of Contents maxLevel 2 minLevel 2 indent 10px exclude Steps style none
FrameworX includes many .NET namespaces by default. Script References are needed only when you require additional external assemblies not included in the platform.
To add a Script Reference:
The new reference appears in the References table.
Property | Description |
---|---|
Target Domain | Where the DLL executes (Server or Client) |
NetAssemblyName | Reference name in the solution |
DefaultNamespace | Primary namespace of the DLL |
Resolved | ? = Successfully loaded, ? = Compilation error (hover for details) |
Portable | Indicates cross-platform compatibility |
AssemblyPathRuntime | Runtime path where assembly loads from |
Use these macros instead of absolute paths for portability:
Macro | Description | Typical Use |
---|---|---|
_ThirdParty_ | MyDocuments/[ProductName]/ThirdParty | Server-side DLLs |
_WpfControls_ | [InstallPath]/WpfControls | Client-side controls |
_ProductPath_ | Product installation directory | System components |
_SolutionPath_ | Solution file directory | Solution-specific DLLs |
_ExecutionPath_ | Working directory (usually solution folder) | Runtime files |
_GAC_ | Global Assembly Cache | Shared .NET assemblies |
Macro | Description |
---|---|
_ExecutionPathAndName_ | Working directory + solution name |
_ProgramFiles_ | Environment.SpecialFolder.ProgramFiles |
_ProgramFilesX86_ | Environment.SpecialFolder.ProgramFilesX86 |
_SolutionName_ | Solution name without path/extension |
_SolutionPathAndName_ | Solution path + name (no extension) |
_Transfers_ | Default transfers folder |
Location: MyDocuments/[ProductName]/ThirdParty
_ThirdParty_
Special Subfolder:
/SNMP
- Additional MIB files for SNMP driverLocation: [InstallPath]/WpfControls
_WpfControls_
<ac:structured-macro ac:name="info"> ac:rich-text-body SmartClient Note: WPF controls require additional manifest configuration for SmartClient deployment. Controls created with T.Portable specification can run on Web Pages. </ac:rich-text-body> </ac:structured-macro>
Go to Scripts → References and add the DLL location.
Open Code Editor and click the Namespace Declarations button to add namespaces.
<ac:structured-macro ac:name="warning"> ac:rich-text-body Important: Never put using
(C#) or Import
(VB.NET) statements directly in code. Always use the Namespace Declarations dialog. Direct statements will cause compilation errors. </ac:rich-text-body> </ac:structured-macro>
csharp
// After adding reference and namespace declaration
// You can use types from the external assembly
var processor = new ExternalLibrary.DataProcessor();
var result = processor.Process(data);
<ac:structured-macro ac:name="note"> ac:rich-text-body The platform caches loaded assemblies for performance. Complete Designer restart is required to reload updated DLLs. </ac:rich-text-body> </ac:structured-macro>
Access via Code Editor toolbar button:
This dialog allows you to:
using
and VB.NET Import
statementsThe declarations apply to:
Page Tree | ||||
---|---|---|---|---|
|