Skip to content

BeforeDiscardModel ​

This event is triggered before a model is discarded.

Parameters ​

ParameterDescription
modelid intValue, contains the ID of the concerned model.

Exit value: ​

Remarks ​

See Also ​

Example ​

The following example makes it impossible to discard a model in a model group named “My Models”

leo-grammar
	ON_EVENT "BeforeDiscardModel" {
	SET id_ModelId: (modelid)     
	CC "Core" GET_MODELGROUP_NAME mgroupid:(mgroupid)    
	IF (mgroupname = "My Models") {        
	SET err:"Deleting Models in this group is not allowed!"        
	CC "AdoScript" ERRORBOX (err)        EXIT -1  # abort without error    
		}
	}