Library | File

Class pfcModelActionListener

# include <pfcModel.h>

class pfcModelActionListener
 : public virtual pfcActionListener
{
    xaideclare(pfcModelActionListener)
    ...
};



Description

This class defines an action listener for models that notifies you when operations on a model occur.
Manual References:
Action Listeners: Creo Object TOOLKIT C++ Action Listeners



Method Summary

voidOnAfterModelCopy (pfcModel_ptr FromMdl, optional pfcModel_ptr ToMdl)
The listener method called after successful execution of a copy command.
voidOnAfterModelCopyAll (pfcModel_ptr FromMdl, optional pfcModel_ptr ToMdl)
This is the listener method called after successful copying of any model (not just an explicit copy of a single model).
voidOnAfterModelCreate (pfcModel_ptr Mdl)
This is the listener method called after successful creation of a model.
voidOnAfterModelDelete (pfcModel_ptr Mdl)
This is the listener method called after successful deletion of a model.
voidOnAfterModelDeleteAll (pfcModelDescriptor_ptr Descr)
The listener method called after successful deletion of any model, (not just an explicit deletion of a single model).
voidOnAfterModelErase (pfcModel_ptr Mdl)
This is the listener method called after successful erasing of a model.
voidOnAfterModelEraseAll (pfcModelDescriptor_ptr Descr)
This is the listener method called after successful erasure of any model, (not just an explicit erasure of a single model).
voidOnAfterModelRename (pfcModel_ptr FromMdl, optional pfcModel_ptr ToMdl)
This is the listener method called after successful renaming of a model.
voidOnAfterModelRetrieve (pfcModel_ptr Mdl)
This is the listener method called after successful retrieval of a model.
voidOnAfterModelRetrieveAll (pfcModelDescriptor_ptr Descr)
This is the listener method called after successful retrieval of any model, (not just an explicit retrieval of a single model).
voidOnAfterModelSave (pfcModelDescriptor_ptr Descr)
This is the listener mothod called after successful saving of a model.
voidOnAfterModelSaveAll (pfcModelDescriptor_ptr Descr)
This is the listener method called after successful saving of any model, (not just an explicit save of a single model).
voidOnBeforeModelDisplay (pfcModel_ptr Mdl)
The listener method called before a model is displayed.
voidOnBeforeParameterCreate (pfcModel_ptr Owner, xrstring Name, pfcParamValue_ptr Value)
This is the listener method called before creating a parameter. To abort parameter creation throw exception pfcXCancelProEAction.
voidOnBeforeParameterDelete (pfcParameter_ptr Param)
This is the listener method called before deleting a parameter. To abort parameter delete operation throw exception pfcXCancelProEAction.
voidOnBeforeParameterModify (pfcParameter_ptr Param, pfcParamValue_ptr Value)
This is the listener method called before modifying a parameter. To abort parameter modification throw exception pfcXCancelProEAction.



Method Detail

voidOnAfterModelSave (pfcModelDescriptor_ptr Descr)

This is the listener mothod called after successful saving of a model.

This listener method is called only for models which are explicitly saved, not for dependent models.
Manual References:
Action Listeners: Model Level Action listeners, Action Listeners: Model Level Action listeners
Parameters:
Descr
The descriptor of the saved model
Returns:



voidOnAfterModelSaveAll (pfcModelDescriptor_ptr Descr)

This is the listener method called after successful saving of any model, (not just an explicit save of a single model).

For example, when saving an assembly and all the component parts in it, this method is called once for each model saved.
Manual References:
Action Listeners: Model Level Action listeners
Parameters:
Descr
The model descriptor of the saved part
Returns:



voidOnAfterModelCopy (pfcModel_ptr FromMdl, optional pfcModel_ptr ToMdl)

The listener method called after successful execution of a copy command.

This method is deprecated. Use pfcModelEventActionListener::OnAfterModelCopy(pfcModelDescriptor_ptr, pfcModelDescriptor_ptr) for better performance. This listener method is called only for models which are explicity copied, not for dependent models.
Parameters:
FromMdl
Source model that was copied.
ToMdl
Target model created by copying.
Returns:



voidOnAfterModelCopyAll (pfcModel_ptr FromMdl, optional pfcModel_ptr ToMdl)

This is the listener method called after successful copying of any model (not just an explicit copy of a single model).

This method is deprecated. Use pfcModelEventActionListener::OnAfterModelCopyAll(pfcModelDescriptor_ptr, pfcModelDescriptor_ptr) for better performance. For example, when copying an assembly and all the component parts in it, this method will be called once for each model copied.
Parameters:
FromMdl
Source model that was copied.
ToMdl
Target model created by copying.
Returns:



voidOnAfterModelRename (pfcModel_ptr FromMdl, optional pfcModel_ptr ToMdl)

This is the listener method called after successful renaming of a model.

This method is deprecated. Use pfcModelEventActionListener::OnAfterModelRename(pfcModelDescriptor_ptr, pfcModelDescriptor_ptr) for better performance. This listener method is called only for models which are explicitly renamed, not for dependent models.
Parameters:
FromMdl
Model that was renamed.
ToMdl
The newly renamed model.
Returns:



voidOnAfterModelErase (pfcModel_ptr Mdl)

This is the listener method called after successful erasing of a model.

This method is deprecated. Use pfcModelEventActionListener::OnAfterModelErase(pfcModelDescriptor_ptr) for better performance. This listener method is called only for models which are explicitly erased, not for dependent models. This listener method will only be invoked if the ModelActionListener is assigned to the Creo Parametric session. It may not be assigned to an individual model.
Parameters:
Mdl
Model that was erased.
Returns:



voidOnAfterModelEraseAll (pfcModelDescriptor_ptr Descr)

This is the listener method called after successful erasure of any model, (not just an explicit erasure of a single model).

For example, when erasing an assembly and all the component parts in it, this method is called once for each model erased. This listener method will only be invoked if the ModelActionListener is assigned to the Creo Parametric session. It may not be assigned to an individual model.
Manual References:
Action Listeners: Model Level Action listeners
Parameters:
Descr
The model descriptor of the erased model
Returns:



voidOnAfterModelDelete (pfcModel_ptr Mdl)

This is the listener method called after successful deletion of a model.

This method is deprecated. Use pfcModelEventActionListener::OnAfterModelDelete(pfcModelDescriptor_ptr) for better performance. This listener method is caled only for models which are explicitly deleted, not for dependent models. This listener method will only be invoked if the ModelActionListener is assigned to the Creo Parametric session. It may not be assigned to an individual model.
Parameters:
Mdl
Model that was deleted.
Returns:



voidOnAfterModelDeleteAll (pfcModelDescriptor_ptr Descr)

The listener method called after successful deletion of any model, (not just an explicit deletion of a single model).

For example, when deleting an assembly and all the component parts in it, called once for each model deleted. This listener method will only be invoked if the ModelActionListener is assigned to the Creo Parametric session. It may not be assigned to an individual model.
Manual References:
Action Listeners: Model Level Action listeners
Parameters:
Descr
The model descriptor of the deleted part
Returns:



voidOnAfterModelRetrieve (pfcModel_ptr Mdl)

This is the listener method called after successful retrieval of a model.

This listener method is called only for models which are explicitly retrieved, not for dependent models. This listener method will only be invoked if the ModelActionListener is assigned to the Creo Parametric session. It may not be assigned to an individual model.
Manual References:
Action Listeners: Model Level Action listeners, Action Listeners: Model Level Action listeners
Parameters:
Mdl
Name of the retrieved model
Returns:



voidOnAfterModelRetrieveAll (pfcModelDescriptor_ptr Descr)

This is the listener method called after successful retrieval of any model, (not just an explicit retrieval of a single model).

For example, when retrieving an assembly and all the component parts in it, this method is called once for each model retrieved. This listener method will only be invoked if the ModelActionListener is assigned to the Creo Parametric session. It may not be assigned to an individual model.
Manual References:
Action Listeners: Model Level Action listeners
Parameters:
Descr
The model descriptor of the retrieved part
Returns:



voidOnBeforeModelDisplay (pfcModel_ptr Mdl)

The listener method called before a model is displayed.

This method is blocked for asynchronous mode, because it causes a significant slowdown when changing the display of a model (rotating or moving).
Manual References:
Action Listeners: Model Level Action listeners, Action Listeners: Model Level Action listeners
Parameters:
Mdl
Name of the model to be displayed
Returns:



voidOnAfterModelCreate (pfcModel_ptr Mdl)

This is the listener method called after successful creation of a model.

This listener method will only be invoked if the ModelActionListener is assigned to the Creo Parametric session. It may not be assigned to an individual model.
Manual References:
Action Listeners: Model Level Action listeners, Action Listeners: Model Level Action listeners
Parameters:
Mdl
Model just created
Returns:



voidOnBeforeParameterCreate (pfcModel_ptr Owner, xrstring Name, pfcParamValue_ptr Value)

This is the listener method called before creating a parameter. To abort parameter creation throw exception pfcXCancelProEAction.

Manual References:
Action Listeners: Cancelling an ActionListener Operation
Parameters:
Owner
Owner model of parameter
Name
Name of parameter
Value
Value of parameter
Returns:



voidOnBeforeParameterModify (pfcParameter_ptr Param, pfcParamValue_ptr Value)

This is the listener method called before modifying a parameter. To abort parameter modification throw exception pfcXCancelProEAction.

Manual References:
Action Listeners: Cancelling an ActionListener Operation
Parameters:
Param
Parameter to be modified
Value
Value of the parameter
Returns:



voidOnBeforeParameterDelete (pfcParameter_ptr Param)

This is the listener method called before deleting a parameter. To abort parameter delete operation throw exception pfcXCancelProEAction.

Manual References:
Action Listeners: Cancelling an ActionListener Operation
Parameters:
Param
Name of parameter to be deleted
Returns: