Creates a sheet.

DlxLayer.DrawSheet(rect, ref, value, options = 0)


Parameter Description
rect A DlxRect object that specify the rectangle to be drawn.
ref A string that specifies the reference.
value A string that specifies the value.
options Specify a combination of the following values:
DlxApp.SHEETOPTION_SHOWHIDDENPIN Displays any pins that are not visible.
DlxApp.SHEETOPTION_EXCLUDEFROMSIM It allows to exclude from the simulation all the components present in the linked page.
DlxApp.SHEETOPTION_EXCLUDEFROMPCB Excludes all components on the linked page from the PCB.

Return Value

The last newly created DlxSheet object. Call the IsValid() method to determine if the object was created correctly.


  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())
  var page = doc.GetActivePage();
  if (page.IsValid())
    var layer = page.GetLayerFromType(DlxApp.LAYERTYPE_DRAWING);
    if (layer.IsValid())
      var rect = new DlxRect(50,40,120,90);
      layer.DrawSheet(rect, "ref", "value");

See also