API Help
EPLAN API / User Guide / API DataModel / Creating pages
Creating pages

In order to create a page in a project, the Eplan.EplApi.DataModel.Page Class provides a Create method. You first instantiate an empty Page object and then call create. The method takes three parameters: first the project, in which the page is to be created, then the type of the page, and finally a PagePropertyList with the identifying properties of the page. 

The types of pages, which you can create are listed in the DocumentTypeManager.DocumentType enumeration. 

 

The example below shows, how to create a schematic page: 

//create new Schematic page in current project
PagePropertyList oPagePropList = new PagePropertyList();
//set Plant
oPagePropList[Properties.Page.DESIGNATION_PLANT] = "P1";
//set Location
oPagePropList[Properties.Page.DESIGNATION_LOCATION] = "L1";
Page oNewPage = new Page();
oNewPage.Create(m_oTestProject, DocumentTypeManager.DocumentType.Circuit, oPagePropList);

Remarks

Please mind, that when you create a page, you cannot set descriptive properties in the PropertyList mentioned above. Only parts of the Page name can be set using this list. 

Other properties need to be set after creating the page by Page.Properties