public void Generating(ref Eplan.EplApi.DataModel.Project project) { project.Properties.PROJ_CUSTOMERTITLE = EplProjectProperties.ProjectTitle; project.Properties.PROJ_INSTALLATIONNAME = EplProjectProperties.Descriptions; project.Properties.PROJ_REVISION_APPROVEDBY = EplProjectProperties.ApprovedPersion; project.Properties.PROJ_REVISION_CHECKEDBY = EplProjectProperties.CheckPersion; project.Properties.PROJ_CREATORNAME1 = EplProjectProperties.Creator; foreach (var item in EplPageProperties) { Eplan.EplApi.DataModel.Page page = null; EplExtension.CreateNewPage(ref project, ref page, new Apps.EplPageProperties { PageName = item.PageName, PageTitle = item.PageTitle, PageDescription = item.PageDescription, DesignationPlant = item.DesignationPlant, Location = item.Location, PageNumber = item.PageNumber, PlotFrame = item.PlotFrame, }); foreach (var macro in item.EplMacroProperties) { macro.FilePath = Path.Combine(BasePath, macro.FileName); EplExtension.InsertMacro(ref project, ref page, macro); } } }
public static Page CreateNewPage(this Project project, ref Page page, string pageName, string title, int number, string plant, string location, string description, string[] userText = null) { EplPageProperties pageProperties = new EplPageProperties { DesignationPlant = plant, Location = location, PageTitle = title, PageNumber = number, PageName = pageName, PageDescription = description, }; if (userText != null) { pageProperties.UserDefinitionText = userText; } EplExtension.CreateNewPage(ref project, ref page, pageProperties); return(page); }