Opens the undo stack for document page management operations.

syntaxSyntax:
DlxGraphixDocument.OpenPageManagementUndo()

Return Value

If the operation ends correctly it returns true. Returns false if the document is closed.

Remarks

Use the OpenPageManagementUndo and ClosePageManagementUndo function pair only to allow you to undo multiple document page management operations using a single Undo command. Page management operations must be specified after OpenPageManagementUndo and before ClosePageManagementUndo. Use the page management operations listed below: DlxGraphixDocument.NewPage, DlxGraphixDocument.DeletePage, DlxGraphixDocument.MovePage, DlxPage.SetName, DlxPage.SetFlags.

Example

  Copy codeCopy code
var prj = DlxApp.GetJob().GetProject("Example Sch");
if (!prj.IsValid())
  prj = DlxApp.GetJob().NewProject("Example Sch");
var doc = prj.GetDocument("Examples Sch", DlxApp.DOCTYPE_SCHEMATIC);
if (!doc.IsValid())
{
  doc = prj.NewDocument("Examples Sch", DlxApp.DOCTYPE_SCHEMATIC);
  doc.SetPageFormat("A4", false);
}
if (doc.IsValid() && doc.Activate())
{
  doc.OpenPageManagementUndo();
  doc.NewPage("page 2", 0, true);
  doc.NewPage("page 1", 0, true);
  doc.ClosePageManagementUndo();
}
DlxApp.Printf("Pages: %i", doc.GetPageCount());

See also