Class ApplicationHelper
Inheritance
ApplicationHelper
Assembly: CAMAPI.DotnetHelper.dll
Syntax
public static class ApplicationHelper
Methods
AskCamAgent(ComWrapper<ICamApiApplication>, string, bool, int)
Send a free-text instruction to the paired CAM Agent (headless --serve) and block until it
finishes. Throws when the agent fails AND interruptOnError is true (the Delphi side only
reports rsError in that case), which stops the caller (e.g. the macro run).
timeoutMs is the overall wait budget for the agent; 0 keeps the client default (10 min).
Returns the agent's answer text (empty on failure or when the answer is empty).
Declaration
public static string AskCamAgent(this ComWrapper<ICamApiApplication> appCom, string message, bool interruptOnError, int timeoutMs = 0)
Parameters
Returns
AttributesManager(ComWrapper<ICamApiApplication>)
Object to manage custom user defined attributes and their libraries
Declaration
public static ComWrapper<ICamApiCustomAttributesManager> AttributesManager(this ComWrapper<ICamApiApplication> appCom)
Parameters
Returns
Constants(ComWrapper<ICamApiApplication>)
Constants used in CAM application
Declaration
public static ComWrapper<ICamApiConstants> Constants(this ComWrapper<ICamApiApplication> appCom)
Parameters
Returns
CreateNewProject(ComWrapper<ICamApiApplication>)
Close the current project without saving and create a new empty project
Declaration
public static void CreateNewProject(this ComWrapper<ICamApiApplication> appCom)
Parameters
ExecutablePath(ComWrapper<ICamApiApplication>)
Declaration
public static string ExecutablePath(this ComWrapper<ICamApiApplication> appCom)
Parameters
Returns
ExportCurrentProject(ComWrapper<ICamApiApplication>, string, bool)
Export current active project with all snapshots to target file
Declaration
public static void ExportCurrentProject(this ComWrapper<ICamApiApplication> appCom, string targetFileName, bool overwrite)
Parameters
GetActiveProject(ComWrapper<ICamApiApplication>)
Active project of instance (can be null if no active project)
Declaration
public static ComWrapper<ICamApiProject> GetActiveProject(this ComWrapper<ICamApiApplication> appCom)
Parameters
Returns
GetExtensionManager(ComWrapper<ICamApiApplication>)
Instance of extension manager
Declaration
public static ComWrapper<IExtensionManager> GetExtensionManager(this ComWrapper<ICamApiApplication> appCom)
Parameters
Returns
HotkeyManager(ComWrapper<ICamApiApplication>)
Manager for plugin-registered global keyboard shortcuts. Reachable during
startup (before the main form exists). Returns null in headless / kernel-only
builds where no GUI hotkey registry was created.
Declaration
public static ComWrapper<ICamApiHotkeyManager>? HotkeyManager(this ComWrapper<ICamApiApplication> appCom)
Parameters
Returns
LanguageCode(ComWrapper<ICamApiApplication>)
Windows Language Code Identifier (LCID) selected for the application
Declaration
public static int LanguageCode(this ComWrapper<ICamApiApplication> appCom)
Parameters
Returns
LanguageName(ComWrapper<ICamApiApplication>)
Name of the language selected for the application
Declaration
public static string LanguageName(this ComWrapper<ICamApiApplication> appCom)
Parameters
Returns
LastActionIdleSeconds(ComWrapper<ICamApiApplication>)
Seconds elapsed since the last raw user input (mouse click / key / wheel)
in ENCY windows. Returns 0 if there was no input yet.
Native modal dialogs (message boxes, file pickers) are not tracked.
Declaration
public static double LastActionIdleSeconds(this ComWrapper<ICamApiApplication> appCom)
Parameters
Returns
LogFilePath(ComWrapper<ICamApiApplication>)
Path to the log file of CAM
Declaration
public static string LogFilePath(this ComWrapper<ICamApiApplication> appCom)
Parameters
Returns
MachinesLibrary(ComWrapper<ICamApiApplication>)
Manager over a library of machines of CAM system
Declaration
public static ComWrapper<ICamApiMachinesLibrary> MachinesLibrary(this ComWrapper<ICamApiApplication> appCom)
Parameters
Returns
Manager over list of machining tools of CAM system
Declaration
public static ComWrapper<ICamApiMachiningToolsManager> MachiningToolsManager(this ComWrapper<ICamApiApplication> appCom)
Parameters
Returns
MacroManager(ComWrapper<ICamApiApplication>)
Object to manage all macros inside a CAM application
Declaration
public static ComWrapper<ICamApiMacroManager> MacroManager(this ComWrapper<ICamApiApplication> appCom)
Parameters
Returns
MainForm(ComWrapper<ICamApiApplication>)
Declaration
public static ComWrapper<ICamApiApplicationMainForm> MainForm(this ComWrapper<ICamApiApplication> appCom)
Parameters
Returns
MainWorkMode(ComWrapper<ICamApiApplication>)
Declaration
public static TMainWorkMode MainWorkMode(this ComWrapper<ICamApiApplication> appCom)
Parameters
Returns
OpenProject(ComWrapper<ICamApiApplication>, string, bool)
Close current project without saving and open new one in instance of active project
Declaration
public static void OpenProject(this ComWrapper<ICamApiApplication> appCom, string fileName, bool addToReOpen)
Parameters
OpenProjectFromPLM(ComWrapper<ICamApiApplication>, string, string)
Close the current project without saving and open one from a PLM system in instance of an active project
Declaration
public static void OpenProjectFromPLM(this ComWrapper<ICamApiApplication> appCom, string plmItemId, string connectionId)
Parameters
PLMManager(ComWrapper<ICamApiApplication>)
Object which works with PLM extensions
Declaration
public static ComWrapper<IPLMManager> PLMManager(this ComWrapper<ICamApiApplication> appCom)
Parameters
Returns
Paths(ComWrapper<ICamApiApplication>)
Paths used in CAM application
Declaration
public static ComWrapper<ICamApiPaths> Paths(this ComWrapper<ICamApiApplication> appCom)
Parameters
Returns
SaveCurrentProject(ComWrapper<ICamApiApplication>, string)
Save current active project (empty FileName rewrites current file)
Declaration
public static void SaveCurrentProject(this ComWrapper<ICamApiApplication> appCom, string fileName)
Parameters
SetActiveProjectMachine(ComWrapper<ICamApiApplication>, ComWrapper<ICamApiMachineInfo>)
Set machine of the current active project
Declaration
public static void SetActiveProjectMachine(this ComWrapper<ICamApiApplication> appCom, ComWrapper<ICamApiMachineInfo> machineInfo)
Parameters
SetMainWorkMode(ComWrapper<ICamApiApplication>, TMainWorkMode)
Set work mode of application
Declaration
public static void SetMainWorkMode(this ComWrapper<ICamApiApplication> appCom, TMainWorkMode value)
Parameters
Theme(ComWrapper<ICamApiApplication>)
Snapshot of currently active UI theme palette.
Returns null in headless / kernel-only builds where the theme
factory was not registered.
Declaration
public static ComWrapper<ICamApiTheme>? Theme(this ComWrapper<ICamApiApplication> appCom)
Parameters
Returns
UserTechOperationList(ComWrapper<ICamApiApplication>)
List of user operations available to be created in the current technologist
Declaration
public static ComWrapper<ICamApiUserTechOperationList> UserTechOperationList(this ComWrapper<ICamApiApplication> appCom)
Parameters
Returns