Create a hotspot object. Hotspot objects must be used to specify the point of insertion (or origin) of symbols and footprints.

syntaxSyntax:
DlxLayer.DrawHotspot(point)

Parameters

Parameter Description
point A DlxPoint object with the coordinates specifying the location of the symbol origin.

Return Value

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

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())
    {
      layer.DrawHotspot(new DlxPoint(80, 90));
    }
  }
}

See also