-
Notifications
You must be signed in to change notification settings - Fork 3
M_Aml_Editor_Plugin_Base_PluginBase_ExecuteCommand
AutomationML edited this page Jun 24, 2019
·
1 revision
AutomationML Editor
This Method enables the AutomationML Editor to execute a command. Only those commands are executable, which are identifiable via the PluginCommandsEnum.
Namespace: Aml.Editor.Plugin.Base
Assembly: AML.Editor.PluginContracts (in AML.Editor.PluginContracts.dll) Version: 2.1
C#
public virtual void ExecuteCommand(
PluginCommandsEnum command,
string amlFilePath
)
VB
Public Overridable Sub ExecuteCommand (
command As PluginCommandsEnum,
amlFilePath As String
)
C++
public:
virtual void ExecuteCommand(
PluginCommandsEnum command,
String^ amlFilePath
)
- command
- Type: Aml.Editor.Plugin.Contracts.PluginCommandsEnum
The command identifier. - amlFilePath
- Type: System.String
The FilePath of the currently loaded AMLDocument, if a CAEXDocument is loaded, otherwise null or empty
IAMLEditorPlugin.ExecuteCommand(PluginCommandsEnum, String)
// ...
switch (command)
{
case PluginCommandsEnum.Activate:
// activation code;
// call your ActivateCommand execution method
ActivateCommand.Execute (amlFilePath);
break;
case PluginCommandsEnum.Terminate:
// termination code;
// call your TerminateCommand execution method
// the Execution Method of the PlugIn may save the changes of the AMLDocument if it was edited by the PlugIn.
// It should raise the PluginTerminated Event. This Event is handled by the AMLEditor, the Editor will
// check, if the Document was modified and ask the user to reload the document. The Editor will also return
// to editing mode if it was disabled during activation.
TerminateCommand.Execute (amlFilePath);
break;
}
The AutomationML Editor PlugIn Implementation Guide
Copyright © AutomationML e.V. 2018
Send comments on this topic to AutomationML office.
- AutomationML Editor API Reference Guide
- Version History
-
AutomationML Editor Plugin Development
- PluginBase Class
- DockPositionEnum Enumeration
- IAMLEditorExternalsPlugin Interface
- IAMLEditorPlugin Interface
- IAMLEditorPluginMetadata Interface
- IAMLEditorView Interface
- IAMLEditorViewCollection Interface
- INotifyAMLDocumentLoad Interface
- INotifyViewActivation Interface
- ISupportsSelection Interface
- IToolBarIntegration Interface
- PluginCommand Class
- PluginCommandsEnum Enumeration
- Aml.Editor.Plugin.Contracts.Commanding Namespace