Gets the height of the image.

syntaxSyntax:
DlxShoot.GetHeight()

Return Value

Returns the height of the image.

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())
{
  var page = doc.GetActivePage();
  if (page.IsValid())
  {
    var layer = page.GetLayerFromType(DlxApp.LAYERTYPE_DRAWING);
    if (layer.IsValid())
    {
      var pos = layer.GetFrontObjectIterator();
      while (pos.IsValid())
      {
        var obj = layer.GetNextObject(pos);
        if (obj.GetType() == DlxApp.OBJTYPE_SHOOT)
        {
          var dlg = new DlxDialog(400, 160, "Image Size");
          if (dlg.IsValid())
          {
            dlg.AddStaticText(10, 33, 70, "Vertical: ");
            dlg.AddStaticText(10, 58, 70, "Horizontal: ");
            var ctrl_h = dlg.AddEditNumber(90, 30, 300, DlxApp.DIALOGEDITNUMBER_LENGTH, obj.GetHeight(), 0, 30);
            var ctrl_w = dlg.AddEditNumber(90, 55, 300, DlxApp.DIALOGEDITNUMBER_LENGTH, obj.GetWidth(), 0, 30);
            dlg.AddOkButton(280, 120, 50, 25);
            dlg.AddCancelButton(340, 120, 50, 25);
            if (dlg.DoModal())
            {
              obj.SetFrame(obj.GetCornerPoint(DlxApp.CORNERINDEX_BOTTOMLEFT), ctrl_w.GetNumber(), ctrl_h.GetNumber());
            }
          }
        }
      }
    }
  }
}

See also