Eplan Platform API
Eplan.EplApi.ApplicationFramework Namespace / ProjectOpenRequirement Enumeration
Example Example

In This Topic
    ProjectOpenRequirement Enumeration
    In This Topic
    Interface to make an action batchable on a server. This action requires the project in one of the following mode.
    Syntax
    public enum ProjectOpenRequirement : System.Enum 
    public enum class ProjectOpenRequirement : public System.Enum 
    Members
    MemberValueDescription
    ProjectCopy3 
    ProjectExclusive2 
    ProjectReadOnly0 
    ProjectWritable1 
    Example
    class ActionSetPropOnAllPagesBatch : IEplActionBatchExtension, IInterface
    {
    	/#region IEplActionBatchExtension Members
    
    // get the display name of this batch action. This is displayed in autoproc dialog.
    public string GetBatchActionDisplayName()
    {
    	return "raise value of page property custom supplementaryfield 1";
    }
    
    // Get the name of the action to execute.
    public string GetBatchActionName()
    {
    	return "ActionSetPropOnAllPages";
    }
    
    // get the parameters.
    // when a dialog should popup to ask the user for the parameters.
    // handling is stopped when false is returned.
    public bool GetParameters(ActionCallingContext pCallingContext)
    {
    	string param1 = "";
    	pCallingContext.GetParameter("param1", ref param1);
    	string param2 = "";
    	pCallingContext.GetParameter("param2", ref param2);
    	bool bOk = InputBox.ShowInputBox(ref param1, ref param2);
    
    	pCallingContext.AddParameter("param1", param1);
    	pCallingContext.AddParameter("param2", param2);
    
    	return bOk;
    }
    
    // Remember this params in script scheme. They are restored when reopeing a dialog
    public string[] GetPersistentParameters()
    {
    	string[] strParamList = new string[2];
    	strParamList[0] = "param1";
    	strParamList[1] = "param2";
    	return strParamList;
    }
    
    // return the needed Settings. Note: this settings has to exist on the client!
    // on server the settings are imported before the action is executed.
    public string[] GetListOfSettings()
    {
    	string[] strSettingList = new string[2];
    	strSettingList[0] = "User.Eplan@EplAddIn@MyAddIn10.param3";
    	strSettingList[1] = "User.Eplan@EplAddIn@MyAddIn10.param4";
    	return strSettingList;
    }
    // This param is used in scripts. The actual project will set to it.
    public string GetProjectParameterInContext()
    {
    	return "ProjectName";
    }
    
    public ProjectOpenRequirement GetProjectRequirement()
    {
    	return ProjectOpenRequirement.ProjectExclusive;
    }
    
    	/#endregion
    
    	/#region IInterface Members
    
    // AutoProcActionInterface is needed to attach to the autoproc dialog
    public string InterfaceName
    {
    	get { return "ActionSetPropOnAllPagesBatch:AutoProcActionInterface"; }
    }
    
    /#endregion
    
    
    }
    Inheritance Hierarchy

    System.Object
       System.ValueType
          System.Enum
             Eplan.EplApi.ApplicationFramework.ProjectOpenRequirement

    See Also