Create a new group of objects.

syntaxSyntax:
FWiz2DImage.BeginGroup(name)

Parameters

Parameter Description
name Enter the name to assign to the group of objects.

Return Value

If an error occurs it returns false otherwise it returns true.

Remarks

All objects created after calling the BeginGroup function are added to the group. To end the construction of the object group, call the EndGroup function.

Example

See the TO-220 sample code for the complete script.

  Copy codeCopy code
function OnBuild2DImage()
{
  var A = FWiz.GetValue("A");
  var J1 = FWiz.GetValue("J1");
  var c = FWiz.GetValue("c");
  var E = FWiz.GetValue("E");
  var F = FWiz.GetValue("F");

  var ctx = FWiz.Get2DImageCtx();
  var rect = new DlxRect();
  var y = J1 + c / 2 - A / 2;

  // body
  ctx.SetPenStyle(0);
  ctx.SetBrushStyle(0);
  rect.SetRect(new DlxPoint(0,y), E, A);  
  ctx.BeginGroup("Body");
  ctx.DrawRectangle(rect);
  ctx.EndGroup();

  // tab
  ctx.SetBrushStyle(1);
  rect.bottom = rect.top - F;
  ctx.BeginGroup("Tab");
  ctx.DrawRectangle(rect);
  ctx.EndGroup();
}

See also