Class AbstractPlugInViewModel<MODEL_TYPE>
Last update: 19.06.2026Namespace: Phoenix.ComponentPlugInSDK.ViewModels
Assembly: Phoenix.ComponentPlugInSDK.dll
This Class serves as a base class for CAM PlugIn ViewModels. It has built-in commands for saving and managing the model state.
public abstract class AbstractPlugInViewModel<MODEL_TYPE> : IPlugInViewModel, INotifyPropertyChanged where MODEL_TYPE : IBuilderUIModel
Type Parameters
MODEL_TYPE
The Type of the model that the viewModel is presenting.
Inheritance
object ← AbstractPlugInViewModel<MODEL_TYPE>
Implements
IPlugInViewModel, INotifyPropertyChanged
Inherited Members
object.ToString(), object.Equals(object), object.Equals(object, object), object.ReferenceEquals(object, object), object.GetHashCode(), object.GetType(), object.MemberwiseClone()
Constructors
Constructor.
Fields
The logger to use.
Displays an error message to the user, in a way defined by the view.
Properties
The Name of the Builder, this will be used to build the WindowTitle and titles of other dialogs.
The ExternalMetadata, if any, associated with the pacz
If there is any status set.
Will be true if StatusMessage is non-null OR StatusColor is not System.Windows.Media.Colors.Transparent
List of input variables in the component.
Whether the view model is currently busy.
Whether there are any unsaved changes in the editor.
If the pacz is NOT read only, this is true when the pacz is writable
If the pacz is read only
Command to apply changes and close the dialog.
List of output variables in the component.
Command to perform an apply operation.
The color to use to indicate the status. System.Windows.Media.Colors.Transparent is used to indicate not set.
The status message to display
The icon of the view's window. If null, the default Windows icon will be used.
The Title of the View's Window, should indicate state(IsDirty, IsBusy)
Methods
CloneInputVariablesFrom(IEnumerable<IRuntimeVariable>)
Sets Phoenix.ComponentPlugInSDK.ViewModels.IPlugInViewModel.InputVariables based on the passed in values
CloneOutputVariablesFrom(IEnumerable<IRuntimeVariable>)
Sets Phoenix.ComponentPlugInSDK.ViewModels.IPlugInViewModel.OutputVariables based on the passed in values
GetVariablesAsPHXVariable(VariableValueScope)
Retrieves the Phoenix.ComponentPlugInSDK.ViewModels.IPlugInViewModel.InputVariables and Phoenix.ComponentPlugInSDK.ViewModels.IPlugInViewModel.OutputVariables
converted to an enumerable of PHXVariable objects.
MoveInputVariablesFrom(IEnumerable<IRuntimeVariable>)
Sets Phoenix.ComponentPlugInSDK.ViewModels.IPlugInViewModel.InputVariables based on the passed in values
MoveOutputVariablesFrom(IEnumerable<IRuntimeVariable>)
Sets Phoenix.ComponentPlugInSDK.ViewModels.IPlugInViewModel.OutputVariables based on the passed in values
Raises the PropertyChanged Event for the calling member
Saves the current state of the component to the Pacz.
Sets the status parameters. If the message is null and the color is the default, System.Windows.Media.Colors.Transparent,
then Phoenix.ComponentPlugInSDK.ViewModels.AbstractPlugInViewModel1.HasStatus` will return false.
SetVariablesAsPHXVariable(IEnumerable<PHXVariable>)
Reads a list of PHXVariable objects and replaces the Phoenix.ComponentPlugInSDK.ViewModels.IPlugInViewModel.InputVariables
and Phoenix.ComponentPlugInSDK.ViewModels.IPlugInViewModel.OutputVariables parameters based on this content, converted to
IRuntimeVariables.
Function to use to handle errors in command executions
This function will be called when the Phoenix.ComponentPlugInSDK.ViewModels.AbstractPlugInViewModel1.InputVariables` change to allow
derived classes to notify the UI.
This function will be called when the Phoenix.ComponentPlugInSDK.ViewModels.AbstractPlugInViewModel1.InputVariables` change to allow
derived classes to notify the UI.
An INotifyPropertyChanged Event Handler that will handle the PropertyChanged event raised when a property is changed.