Class ApplicationHelper
Inheritance
ApplicationHelper
Assembly: CAMIPC.DotnetHelper.dll
Syntax
public static class ApplicationHelper
Methods
Close(ComWrapper<ICamIpcApplication>, bool)
Declaration
public static ComWrapper<IListString> Close(this ComWrapper<ICamIpcApplication> app, bool asyncMode)
Parameters
Returns
CreateListener(ComWrapper<ICamIpcApplication>)
Create listener for events from CAM application
Declaration
public static ComWrapper<ICamIpcEventListener> CreateListener(this ComWrapper<ICamIpcApplication> app)
Parameters
Returns
ExecutablePath(ComWrapper<ICamIpcApplication>)
Declaration
public static string ExecutablePath(this ComWrapper<ICamIpcApplication> app)
Parameters
Returns
ExportCurrentProject(ComWrapper<ICamIpcApplication>, string, bool)
Declaration
public static void ExportCurrentProject(this ComWrapper<ICamIpcApplication> app, string targetFileName, bool overwrite)
Parameters
ExtensionManager(ComWrapper<ICamIpcApplication>)
Returns the extension manager
Declaration
public static ComWrapper<IIpcExtensionManager> ExtensionManager(this ComWrapper<ICamIpcApplication> app)
Parameters
Returns
GetDefaultListener(ComWrapper<ICamIpcApplication>)
Return instance of default listener for events from CAM application
Declaration
public static ComWrapper<ICamIpcEventListener> GetDefaultListener(this ComWrapper<ICamIpcApplication> app)
Parameters
Returns
GetLogFilePath(ComWrapper<ICamIpcApplication>)
Return path to log file of CAM application
Declaration
public static string GetLogFilePath(this ComWrapper<ICamIpcApplication> app)
Parameters
Returns
GetMainFormTimeOut(ComWrapper<ICamIpcApplication>, int)
Return main form of CAM application with timeout
Declaration
public static ComWrapper<ICamIpcApplicationMainForm> GetMainFormTimeOut(this ComWrapper<ICamIpcApplication> app, int timeout)
Parameters
Returns
GetMainWorkMode(ComWrapper<ICamIpcApplication>)
Return main work mode of CAM application
Declaration
public static TMainWorkMode GetMainWorkMode(this ComWrapper<ICamIpcApplication> app)
Parameters
Returns
GetPort(ComWrapper<ICamIpcApplication>)
Get IPC port of CAM application
Declaration
public static int GetPort(this ComWrapper<ICamIpcApplication> app)
Parameters
Returns
GetSingletonExtension(ComWrapper<ICamIpcApplication>, string)
Return the single shared instance of a singleton extension by its type id
Declaration
public static ComWrapper<IIpcExtension> GetSingletonExtension(this ComWrapper<ICamIpcApplication> app, string extensionTypeId)
Parameters
Returns
GetSingletonExtension<T>(ComWrapper<ICamIpcApplication>, string)
Return a singleton extension narrowed to a concrete interface via QI-cast
Declaration
public static ComWrapper<T> GetSingletonExtension<T>(this ComWrapper<ICamIpcApplication> app, string extensionTypeId) where T : class
Parameters
Returns
Type Parameters
Import machining tools from local tool exchange files (.sc12tool) into the active project.
A tool whose origin is already in the project replaces that tool.
Declaration
public static IReadOnlyList<string> ImportToolsFromFile(this ComWrapper<ICamIpcApplication> app, IEnumerable<string> fileNames, string operationID = "")
Parameters
Returns
| Type |
Description |
| IReadOnlyList<string> |
Identifiers of the imported tools; pass one to ShowToolWindow to show it.
|
Import machining tools from a PLM system into the active project. The batch is downloaded
in one session; a tool whose origin is already in the project replaces that tool.
Declaration
public static IReadOnlyList<string> ImportToolsFromPLM(this ComWrapper<ICamIpcApplication> app, string extensionTypeId, IEnumerable<string> itemIds, string connectionId = "", string operationID = "")
Parameters
| Type |
Name |
Description |
| ComWrapper<ICamIpcApplication> |
app |
Application
|
| string |
extensionTypeId |
Identifier of the PLM extension to use. Required.
|
| IEnumerable<string> |
itemIds |
Identifiers of the tool assembly items in the PLM system.
|
| string |
connectionId |
Optional. A specific PLM connection; empty means the only connection of that extension type.
|
| string |
operationID |
Optional. Operation to set the imported tool as the tool of; a single item only.
|
Returns
| Type |
Description |
| IReadOnlyList<string> |
Identifiers of the imported tools; pass one to ShowToolWindow to show it.
|
IsAlive(ComWrapper<ICamIpcApplication>)
Is instance of CAM application running and can answer on IPC requests
Declaration
public static bool IsAlive(this ComWrapper<ICamIpcApplication> app)
Parameters
Returns
IsAsyncWorkStarted(ComWrapper<ICamIpcApplication>)
Is StartAsyncWork in effect, i.e. is this application listening for the verdicts of its
asynchronous commands right now.
Ask before starting it in code that only borrows the verdicts: stopping a listener the
application started itself would cut it off from its own answers.
Declaration
public static bool IsAsyncWorkStarted(this ComWrapper<ICamIpcApplication> app)
Parameters
Returns
IsBusy(ComWrapper<ICamIpcApplication>)
Is instance of CAM is in process of answering on any IPC request
Declaration
public static bool IsBusy(this ComWrapper<ICamIpcApplication> app)
Parameters
Returns
IsMainFormReady(ComWrapper<ICamIpcApplication>)
Declaration
public static bool IsMainFormReady(this ComWrapper<ICamIpcApplication> app)
Parameters
Returns
IsWindowed(ComWrapper<ICamIpcApplication>)
Instance is windowed or not
Declaration
public static bool IsWindowed(this ComWrapper<ICamIpcApplication> app)
Parameters
Returns
LastActionIdleSeconds(ComWrapper<ICamIpcApplication>)
Seconds elapsed since the last user input (mouse/keyboard) in the session
that runs the CAM application
Declaration
public static double LastActionIdleSeconds(this ComWrapper<ICamIpcApplication> app)
Parameters
Returns
MachinesLibrary(ComWrapper<ICamIpcApplication>)
Manager over library of machines of CAM system
Declaration
public static ComWrapper<ICamIpcMachinesLibrary> MachinesLibrary(this ComWrapper<ICamIpcApplication> app)
Parameters
Returns
Return the machining tools manager
Declaration
public static ComWrapper<ICamIpcMachiningToolsManager> MachiningToolsManager(this ComWrapper<ICamIpcApplication> app)
Parameters
Returns
MacroManager(ComWrapper<ICamIpcApplication>)
Object to manage all macros inside CAM application
Declaration
public static ComWrapper<ICamIpcMacroManager> MacroManager(this ComWrapper<ICamIpcApplication> app)
Parameters
Returns
MainForm(ComWrapper<ICamIpcApplication>)
Declaration
public static ComWrapper<ICamIpcApplicationMainForm> MainForm(this ComWrapper<ICamIpcApplication> app)
Parameters
Returns
OpenProject(ComWrapper<ICamIpcApplication>, string, bool)
Declaration
public static void OpenProject(this ComWrapper<ICamIpcApplication> app, string fileName, bool addToReOpen)
Parameters
OpenProjectFromPLM(ComWrapper<ICamIpcApplication>, string, string)
Declaration
public static void OpenProjectFromPLM(this ComWrapper<ICamIpcApplication> app, string plmItemId, string connectionId)
Parameters
PLMManager(ComWrapper<ICamIpcApplication>)
Declaration
public static ComWrapper<IIpcPLMManager> PLMManager(this ComWrapper<ICamIpcApplication> app)
Parameters
Returns
Paths(ComWrapper<ICamIpcApplication>)
Access to paths, used in CAM application
Declaration
public static ComWrapper<ICamIpcPaths> Paths(this ComWrapper<ICamIpcApplication> app)
Parameters
Returns
ProcessId(ComWrapper<ICamIpcApplication>)
Return process ID of CAM application
Declaration
public static int ProcessId(this ComWrapper<ICamIpcApplication> app)
Parameters
Returns
Project(ComWrapper<ICamIpcApplication>)
Return the active project
Declaration
public static ComWrapper<ICamIpcProject> Project(this ComWrapper<ICamIpcApplication> app)
Parameters
Returns
RegisterHandler(ComWrapper<ICamIpcApplication>, string, ICamIpcEventHandler, ICamIpcEventListener)
Register handler for events from CAM application
Declaration
public static void RegisterHandler(this ComWrapper<ICamIpcApplication> app, string handlerIdent, ICamIpcEventHandler handler, ICamIpcEventListener listener)
Parameters
RegisterWorkingThread(ComWrapper<ICamIpcApplication>, int)
Register working thread in CAM application
Declaration
public static void RegisterWorkingThread(this ComWrapper<ICamIpcApplication> app, int threadHandle)
Parameters
SaveCurrentProject(ComWrapper<ICamIpcApplication>, string)
Declaration
public static void SaveCurrentProject(this ComWrapper<ICamIpcApplication> app, string fileName)
Parameters
SetActiveProjectMachine(ComWrapper<ICamIpcApplication>, ICamIpcMachineInfo)
Set active project machine
Declaration
public static void SetActiveProjectMachine(this ComWrapper<ICamIpcApplication> app, ICamIpcMachineInfo machineInfo)
Parameters
SetMainWorkMode(ComWrapper<ICamIpcApplication>, TMainWorkMode)
Set main work mode of CAM application
Declaration
public static void SetMainWorkMode(this ComWrapper<ICamIpcApplication> app, TMainWorkMode workMode)
Parameters
StartAsyncWork(ComWrapper<ICamIpcApplication>)
Start async work in CAM application
Declaration
public static void StartAsyncWork(this ComWrapper<ICamIpcApplication> app)
Parameters
StopAsyncWork(ComWrapper<ICamIpcApplication>)
Stop async work in CAM application
Declaration
public static void StopAsyncWork(this ComWrapper<ICamIpcApplication> app)
Parameters
UnregisterHandler(ComWrapper<ICamIpcApplication>, string)
Unregister handler for events from CAM application
Declaration
public static void UnregisterHandler(this ComWrapper<ICamIpcApplication> app, string handlerIdent)
Parameters
UnregisterWorkingThread(ComWrapper<ICamIpcApplication>, int)
Unregister working thread in CAM application
Declaration
public static void UnregisterWorkingThread(this ComWrapper<ICamIpcApplication> app, int threadHandle)
Parameters
UserTechOperationList(ComWrapper<ICamIpcApplication>)
List of user operations available to be created in the current technologist
Declaration
public static ComWrapper<ICamIpcUserTechOperationList> UserTechOperationList(this ComWrapper<ICamIpcApplication> app)
Parameters
Returns
UtilityManager(ComWrapper<ICamIpcApplication>)
Return the utility manager
Declaration
public static ComWrapper<ICamIpcUtilityManager> UtilityManager(this ComWrapper<ICamIpcApplication> app)
Parameters
Returns
WaitForAsyncWork(ComWrapper<ICamIpcApplication>, int)
Wait for the asynchronous command this thread sent last and throw if it failed.
An asynchronous command answers "queued" at once, so a failure while it was actually
running has nowhere to go until it is asked for here. Requires
StartAsyncWork(ComWrapper<ICamIpcApplication>): without it ENCY has no port to answer on.
Declaration
public static void WaitForAsyncWork(this ComWrapper<ICamIpcApplication> app, int timeoutMs)
Parameters
Exceptions
| Type |
Condition |
| Exception |
The command failed, nothing was sent asynchronously from this thread, or the answer
did not arrive within the timeout
|
WaitForStarted(ComWrapper<ICamIpcApplication>, int)
Wait for CAM application to start
Declaration
public static void WaitForStarted(this ComWrapper<ICamIpcApplication> app, int timeout)
Parameters