This function returns the page width.

syntaxSyntax:
DlxGraphixDocument.GetPageWidth()

Return Value

If the document is open, this function returns the page width in millimeters. If the document is closed it returns 0.

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())
{
  DlxApp.Printf("%s : Format=%s Width=%.1fmm Height=%.1fmm.", doc.GetName(), doc.GetPageFormat(), doc.GetPageWidth(), doc.GetPageHeight());
}

See also