unit PCScript;

interface
Uses Delphin, PowerCad,pctypesutils,classes,graphics,windows,sysutils;

Procedure SetControlForScripting(Value: TPowerCad);

Var CadControl: TPowerCad;
    Points :TDoublePointArr;

implementation
uses U_Common;

Procedure SetControlForScripting(Value: TPowerCad);
Begin
  CadControl := value;
end;

////////////////////////

function MySetPointArray(slf:TObject;var APropName:String;var s:array of variant):variant;
var cnt: Integer;
Begin
  cnt := Integer(s[0]);
  if cnt >= length(points) then Setlength(points,cnt+1);
  Points[cnt] := DoublePoint(s[1],s[2]);
End;

function MyFillPointArray(slf:TObject;var APropName:String;var s:array of variant):variant;
var cnt: Integer;
    i: Integer;
    done: Boolean;
    pntVal,pntS: String;
    v,vx,vy: Double;
    isx: Boolean;
Begin
  pnts := s[0];
  done := false;
  isx := false;
  cnt := 0;
  Setlength(points,0);
  for i := 1 to length(pnts) do
  begin
    if (pnts[i]<> '.') or (pnts[i] <> '-') or (pnts[i] < '0') or (pnts[i] > '9') then begin
      v := StrToFloat_My(pntval);
      pntval := '';
      if isx then begin
        isx := false;
        vx := v;
      end else begin
        isx := true;
        cnt := cnt+1;
        Setlength(Points,cnt);
        Points[cnt-1] := DoublePOint(vx,vy);
      end;
    end else begin
      pntval := pntval+pnts[i];
    end;
  end;

End;

Function _MethodPolyLine(slf:TObject;var APropName:String;var s:array of variant):variant;
  var Param1:TDoublePoint;
Begin
  Result := CadControl.PolyLine(s[0],Points,s[1],s[2],s[3],s[4],s[5],s[6],s[7],s[8]);
End;

Function _GetPropDotsPerMil(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.DotsPerMil;
End;

Function _GetPropLocked(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.Locked;
End;

Function _SetPropLocked(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.Locked := S[0];
End;

Function _GetPropUpdated(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.Updated;
End;

Function _SetPropUpdated(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.Updated := S[0];
End;

Function _GetPropAutoRefresh(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.AutoRefresh;
End;

Function _SetPropAutoRefresh(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.AutoRefresh := S[0];
End;

Function _GetPropRulerVisible(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.RulerVisible;
End;

Function _SetPropRulerVisible(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.RulerVisible := S[0];
End;

Function _GetPropVerticalZero(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.VerticalZero;
End;

Function _SetPropVerticalZero(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.VerticalZero := S[0];
End;

Function _GetPropHorizontalZero(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.HorizontalZero;
End;

Function _SetPropHorizontalZero(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.HorizontalZero := S[0];
End;

Function _GetPropToolIdx(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.ToolIdx;
End;

Function _GetPropToolInfo(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.ToolInfo;
End;

Function _GetPropToolData(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.ToolData;
End;

Function _GetPropDotsPerMilOrig(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.DotsPerMilOrig;
End;

Function _SetPropDotsPerMilOrig(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.DotsPerMilOrig := S[0];
End;

Function _GetPropActiveLayer(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.ActiveLayer;
End;

Function _SetPropActiveLayer(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.ActiveLayer := S[0];
End;

Function _GetPropZoomScale(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.ZoomScale;
End;

Function _SetPropZoomScale(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.ZoomScale := S[0];
End;

Function _GetPropGuidesVisible(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.GuidesVisible;
End;

Function _SetPropGuidesVisible(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.GuidesVisible := S[0];
End;

Function _GetPropBackGround(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.BackGround;
End;

Function _SetPropBackGround(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.BackGround := S[0];
End;

Function _GetPropPageColor(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.PageColor;
End;

Function _SetPropPageColor(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.PageColor := S[0];
End;

Function _GetPropGrids(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.Grids;
End;

Function _SetPropGrids(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.Grids := S[0];
End;

Function _GetPropGridType(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.GridType;
End;

Function _SetPropGridType(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.GridType := S[0];
End;

Function _GetPropCenterGuide(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.CenterGuide;
End;

Function _SetPropCenterGuide(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.CenterGuide := S[0];
End;

Function _GetPropPageGuide(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.PageGuide;
End;

Function _SetPropPageGuide(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.PageGuide := S[0];
End;

Function _GetPropDrawShadow(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.DrawShadow;
End;

Function _SetPropDrawShadow(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.DrawShadow := S[0];
End;

Function _GetPropDrawPageBorder(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.DrawPageBorder;
End;

Function _SetPropDrawPageBorder(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.DrawPageBorder := S[0];
End;

Function _GetPropGridColor(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.GridColor;
End;

Function _SetPropGridColor(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.GridColor := S[0];
End;

Function _GetPropGuideColor(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.GuideColor;
End;

Function _SetPropGuideColor(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.GuideColor := S[0];
End;

Function _GetPropRulerColor(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.RulerColor;
End;

Function _SetPropRulerColor(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.RulerColor := S[0];
End;

Function _GetPropGridStep(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.GridStep;
End;

Function _SetPropGridStep(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.GridStep := S[0];
End;

Function _GetPropWorkHeight(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.WorkHeight;
End;

Function _SetPropWorkHeight(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.WorkHeight := S[0];
End;

Function _GetPropWorkWidth(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.WorkWidth;
End;

Function _SetPropWorkWidth(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.WorkWidth := S[0];
End;

Function _GetPropPageLayout(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.PageLayout;
End;

Function _SetPropPageLayout(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.PageLayout := S[0];
End;

Function _GetPropPageOrient(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.PageOrient;
End;

Function _SetPropPageOrient(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.PageOrient := S[0];
End;

Function _GetPropGuideTrace(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.GuideTrace;
End;

Function _SetPropGuideTrace(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.GuideTrace := S[0];
End;

Function _GetPropSnapToGuides(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.SnapToGuides;
End;

Function _SetPropSnapToGuides(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.SnapToGuides := S[0];
End;

Function _GetPropSnapToNearPoint(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.SnapToNearPoint;
End;

Function _SetPropSnapToNearPoint(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.SnapToNearPoint := S[0];
End;

Function _GetPropSnapToGrids(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.SnapToGrids;
End;

Function _SetPropSnapToGrids(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.SnapToGrids := S[0];
End;

Function _GetPropScrollBars(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.ScrollBars;
End;

Function _SetPropScrollBars(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.ScrollBars := S[0];
End;

Function _GetPropRulerSystem(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.RulerSystem;
End;

Function _SetPropRulerSystem(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.RulerSystem := S[0];
End;

Function _GetPropDrawInCursor(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.DrawInCursor;
End;

Function _SetPropDrawInCursor(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.DrawInCursor := S[0];
End;

Function _GetPropRealScale(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.RealScale;
End;

Function _SetPropRealScale(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.RealScale := S[0];
End;

Function _GetPropMetricMode(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.MetricMode;
End;

Function _SetPropMetricMode(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.MetricMode := S[0];
End;

Function _GetPropAngularMode(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.AngularMode;
End;

Function _SetPropAngularMode(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.AngularMode := S[0];
End;

Function _GetPropWmfPrinting(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.WmfPrinting;
End;

Function _SetPropWmfPrinting(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.WmfPrinting := S[0];
End;

Function _GetPropDefaultPenColor(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.DefaultPenColor;
End;

Function _SetPropDefaultPenColor(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.DefaultPenColor := S[0];
End;

Function _GetPropDefaultBrushColor(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.DefaultBrushColor;
End;

Function _SetPropDefaultBrushColor(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.DefaultBrushColor := S[0];
End;

Function _GetPropDefaultPenWidth(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.DefaultPenWidth;
End;

Function _SetPropDefaultPenWidth(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.DefaultPenWidth := S[0];
End;

Function _GetPropDefaultPenStyle(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.DefaultPenStyle;
End;

Function _SetPropDefaultPenStyle(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.DefaultPenStyle := S[0];
End;

Function _GetPropDefaultBrushStyle(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.DefaultBrushStyle;
End;

Function _SetPropDefaultBrushStyle(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.DefaultBrushStyle := S[0];
End;

Function _GetPropDefaultRowStyle(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.DefaultRowStyle;
End;

Function _SetPropDefaultRowStyle(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.DefaultRowStyle := S[0];
End;

Function _GetPropDefaultTextHeight(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.DefaultTextHeight;
End;

Function _SetPropDefaultTextHeight(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.DefaultTextHeight := S[0];
End;

Function _GetPropDefaultTextRatio(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.DefaultTextRatio;
End;

Function _SetPropDefaultTextRatio(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.DefaultTextRatio := S[0];
End;

Function _GetPropDefaultPLineClosed(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.DefaultPLineClosed;
End;

Function _SetPropDefaultPLineClosed(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.DefaultPLineClosed := S[0];
End;

Function _GetPropDefaultArcStyle(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.DefaultArcStyle;
End;

Function _SetPropDefaultArcStyle(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.DefaultArcStyle := S[0];
End;

Function _GetPropLayerCount(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.LayerCount;
End;

Function _GetPropFigureCount(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.FigureCount;
End;

Function _GetPropSelectedCount(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.SelectedCount;
End;

Function _GetPropMapScale(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.MapScale;
End;

Function _SetPropMapScale(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.MapScale := S[0];
End;

Function _GetPropRescaleToMap(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.RescaleToMap;
End;

Function _SetPropRescaleToMap(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.RescaleToMap := S[0];
End;

Function _GetPropAutoSelect(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.AutoSelect;
End;

Function _SetPropAutoSelect(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.AutoSelect := S[0];
End;

Function _GetPropKeyCommands(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.KeyCommands;
End;

Function _SetPropKeyCommands(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.KeyCommands := S[0];
End;

Function _GetPropRecordUndo(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.RecordUndo;
End;

Function _SetPropRecordUndo(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.RecordUndo := S[0];
End;

Function _GetPropUndoCount(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.UndoCount;
End;

Function _SetPropUndoCount(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.UndoCount := S[0];
End;

Function _GetPropDefaultPictureFolder(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.DefaultPictureFolder;
End;

Function _SetPropDefaultPictureFolder(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.DefaultPictureFolder := S[0];
End;

Function _GetPropSaveWithPreview(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.SaveWithPreview;
End;

Function _SetPropSaveWithPreview(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.SaveWithPreview := S[0];
End;

Function _GetPropRulerMode(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.RulerMode;
End;

Function _SetPropRulerMode(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.RulerMode := S[0];
End;

Function _GetPropZoomRect(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.ZoomRect;
End;

Function _SetPropZoomRect(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.ZoomRect := S[0];
End;

Function _GetPropRangeCheck(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.RangeCheck;
End;

Function _SetPropRangeCheck(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.RangeCheck := S[0];
End;

Function _GetPropAutoTilePrint(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.AutoTilePrint;
End;

Function _SetPropAutoTilePrint(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.AutoTilePrint := S[0];
End;

Function _GetPropFigureGuides(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.FigureGuides;
End;

Function _SetPropFigureGuides(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.FigureGuides := S[0];
End;

Function _GetPropNativeFill(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.NativeFill;
End;

Function _SetPropNativeFill(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.NativeFill := S[0];
End;

Function _GetPropActiveFile(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.ActiveFile;
End;

Function _SetPropActiveFile(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.ActiveFile := S[0];
End;

Function _GetPropCurrentColor(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.CurrentColor;
End;

Function _SetPropCurrentColor(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.CurrentColor := S[0];
End;

Function _GetPropCurrentStyle(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.CurrentStyle;
End;

Function _SetPropCurrentStyle(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.CurrentStyle := S[0];
End;

Function _GetPropCurrentString(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.CurrentString;
End;

Function _SetPropCurrentString(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.CurrentString := S[0];
End;

Function _GetPropCurrentFlag(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.CurrentFlag;
End;

Function _SetPropCurrentFlag(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.CurrentFlag := S[0];
End;

Function _GetPropCurrentFileName(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.CurrentFileName;
End;

Function _SetPropCurrentFileName(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.CurrentFileName := S[0];
End;

Function _GetPropCurrentValue(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.CurrentValue;
End;

Function _SetPropCurrentValue(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.CurrentValue := S[0];
End;

Function _GetPropFileExtension(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.FileExtension;
End;

Function _SetPropFileExtension(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.FileExtension := S[0];
End;

Function _GetPropMultiSelect(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.MultiSelect;
End;

Function _SetPropMultiSelect(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.MultiSelect := S[0];
End;

Function _GetPropOpenDialogTitle(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.OpenDialogTitle;
End;

Function _SetPropOpenDialogTitle(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.OpenDialogTitle := S[0];
End;

Function _GetPropOpenDialogFilter(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.OpenDialogFilter;
End;

Function _SetPropOpenDialogFilter(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.OpenDialogFilter := S[0];
End;

Function _GetPropSaveDialogTitle(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.SaveDialogTitle;
End;

Function _SetPropSaveDialogTitle(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.SaveDialogTitle := S[0];
End;

Function _GetPropSaveDialogFilter(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.SaveDialogFilter;
End;

Function _SetPropSaveDialogFilter(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.SaveDialogFilter := S[0];
End;

Function _GetPropAcceptFiles(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.AcceptFiles;
End;

Function _SetPropAcceptFiles(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.AcceptFiles := S[0];
End;

Function _GetPropMouseCommands(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.MouseCommands;
End;

Function _SetPropMouseCommands(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.MouseCommands := S[0];
End;

Function _GetPropPopStyle(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.PopStyle;
End;

Function _SetPropPopStyle(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.PopStyle := S[0];
End;

Function _GetPropCustomPopItems(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.CustomPopItems;
End;

Function _SetPropCustomPopItems(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.CustomPopItems := S[0];
End;

Function _GetPropMirrorStraight(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.MirrorStraight;
End;

Function _SetPropMirrorStraight(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.MirrorStraight := S[0];
End;

Function _GetPropDrawingPop(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.DrawingPop;
End;

Function _SetPropDrawingPop(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.DrawingPop := S[0];
End;

Function _MethodPrintMessage(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.PrintMessage(s[0]);
End;

Function _MethodRefresh(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.Refresh;
End;

Function _MethodClientToScreen_X(slf:TObject;var APropName:String;var s:array of variant):variant;
var res:TPoint;
  var Param0:TPoint;
Begin
  Param0 := Point(s[0],s[1]);
  Res := CadControl.ClientToScreen(Param0);
  Result := Res.X;
End;

Function _MethodClientToScreen_Y(slf:TObject;var APropName:String;var s:array of variant):variant;
var res:TPoint;
  var Param0:TPoint;
Begin
  Param0 := Point(s[0],s[1]);
  Res := CadControl.ClientToScreen(Param0);
  Result := Res.Y;
End;

Function _MethodScreenToClient_X(slf:TObject;var APropName:String;var s:array of variant):variant;
var res:TPoint;
  var Param0:TPoint;
Begin
  Param0 := Point(s[0],s[1]);
  Res := CadControl.ScreenToClient(Param0);
  Result := Res.X;
End;

Function _MethodScreenToClient_Y(slf:TObject;var APropName:String;var s:array of variant):variant;
var res:TPoint;
  var Param0:TPoint;
Begin
  Param0 := Point(s[0],s[1]);
  Res := CadControl.ScreenToClient(Param0);
  Result := Res.Y;
End;

Function _MethodSetCustomSurface(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.SetCustomSurface(s[0],s[1]);
End;

Function _MethodDoResize(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.DoResize;
End;

Function _MethodSaveScroll(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.SaveScroll;
End;

Function _MethodRestoreScroll(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.RestoreScroll;
End;

Function _MethodReLocate(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.ReLocate;
End;

Function _MethodDoSurfaceMove(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.DoSurfaceMove(s[0],s[1],s[2]);
End;

Function _MethodDoSurfaceClick(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.DoSurfaceClick;
End;

Function _MethodDoSurfaceDblClick(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.DoSurfaceDblClick;
End;

Function _MethodDoSurfaceLeave(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.DoSurfaceLeave;
End;

Function _MethodDoSurfaceDragDrop(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.DoSurfaceDragDrop(s[0],s[1],s[2]);
End;

Function _MethodDoSurfacePull(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.DoSurfacePull(s[0],s[1],s[2],s[3]);
End;

Function _MethodDoSurfacePush(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.DoSurfacePush(s[0],s[1],s[2],s[3]);
End;

Function _MethodDoSurfaceWheel(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.DoSurfaceWheel(s[0],s[1],s[2],s[3]);
End;

Function _MethodDoKeyStroke(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.DoKeyStroke(s[0],s[1]);
End;

Function _MethodCheckForGuideDrop(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.CheckForGuideDrop(s[0],s[1]);
End;

Function _MethodDragStarted(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.DragStarted;
End;

Function _MethodGetSelectionRect_Left(slf:TObject;var APropName:String;var s:array of variant):variant;
var res:TDoubleRect;
Begin
  Res := CadControl.GetSelectionRect;
  Result := Res.Left;
End;

Function _MethodGetSelectionRect_Top(slf:TObject;var APropName:String;var s:array of variant):variant;
var res:TDoubleRect;
Begin
  Res := CadControl.GetSelectionRect;
  Result := Res.Top;
End;

Function _MethodGetSelectionRect_Right(slf:TObject;var APropName:String;var s:array of variant):variant;
var res:TDoubleRect;
Begin
  Res := CadControl.GetSelectionRect;
  Result := Res.Right;
End;

Function _MethodGetSelectionRect_Bottom(slf:TObject;var APropName:String;var s:array of variant):variant;
var res:TDoubleRect;
Begin
  Res := CadControl.GetSelectionRect;
  Result := Res.Bottom;
End;

Function _MethodGetDrawingRect_Left(slf:TObject;var APropName:String;var s:array of variant):variant;
var res:TDoubleRect;
Begin
  Res := CadControl.GetDrawingRect;
  Result := Res.Left;
End;

Function _MethodGetDrawingRect_Top(slf:TObject;var APropName:String;var s:array of variant):variant;
var res:TDoubleRect;
Begin
  Res := CadControl.GetDrawingRect;
  Result := Res.Top;
End;

Function _MethodGetDrawingRect_Right(slf:TObject;var APropName:String;var s:array of variant):variant;
var res:TDoubleRect;
Begin
  Res := CadControl.GetDrawingRect;
  Result := Res.Right;
End;

Function _MethodGetDrawingRect_Bottom(slf:TObject;var APropName:String;var s:array of variant):variant;
var res:TDoubleRect;
Begin
  Res := CadControl.GetDrawingRect;
  Result := Res.Bottom;
End;

Function _MethodGetVisibleRect_Left(slf:TObject;var APropName:String;var s:array of variant):variant;
var res:TDoubleRect;
Begin
  Res := CadControl.GetVisibleRect;
  Result := Res.Left;
End;

Function _MethodGetVisibleRect_Top(slf:TObject;var APropName:String;var s:array of variant):variant;
var res:TDoubleRect;
Begin
  Res := CadControl.GetVisibleRect;
  Result := Res.Top;
End;

Function _MethodGetVisibleRect_Right(slf:TObject;var APropName:String;var s:array of variant):variant;
var res:TDoubleRect;
Begin
  Res := CadControl.GetVisibleRect;
  Result := Res.Right;
End;

Function _MethodGetVisibleRect_Bottom(slf:TObject;var APropName:String;var s:array of variant):variant;
var res:TDoubleRect;
Begin
  Res := CadControl.GetVisibleRect;
  Result := Res.Bottom;
End;

Function _MethodDeConvertXY(slf:TObject;var APropName:String;var s:array of variant):variant;
  var Param0:Double;
  var Param1:Double;
  var Param2:Double;
Begin
  Param0 := Double(s[0]);
  Param1 := Double(s[1]);
  Param2 := Double(s[2]);
  CadControl.DeConvertXY(Param0,Param1,Param2);
  s[0] := Param0;
  s[1] := Param1;
  s[2] := Param2;
End;

Function _MethodDeConvertDim(slf:TObject;var APropName:String;var s:array of variant):variant;
  var Param0:Double;
Begin
  Param0 := Double(s[0]);
  CadControl.DeConvertDim(Param0);
  s[0] := Param0;
End;

Function _MethodConvertXY(slf:TObject;var APropName:String;var s:array of variant):variant;
  var Param0:double;
  var Param1:double;
  var Param2:double;
Begin
  Param0 := double(s[0]);
  Param1 := double(s[1]);
  Param2 := double(s[2]);
  CadControl.ConvertXY(Param0,Param1,Param2);
  s[0] := Param0;
  s[1] := Param1;
  s[2] := Param2;
End;

Function _MethodConvertDim(slf:TObject;var APropName:String;var s:array of variant):variant;
  var Param0:double;
Begin
  Param0 := double(s[0]);
  CadControl.ConvertDim(Param0);
  s[0] := Param0;
End;

Function _MethodZoomArea(slf:TObject;var APropName:String;var s:array of variant):variant;
  var Param0:TDoubleRect;
Begin
  Param0 := DoubleRect(s[0],s[1],s[2],s[3]);
  CadControl.ZoomArea(Param0);
End;

Function _MethodFitToWindow(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.FitToWindow;
End;

Function _MethodActualSize(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.ActualSize;
End;

Function _MethodZoomOut(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.ZoomOut;
End;

Function _MethodZoomIn(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.ZoomIn;
End;

Function _MethodClearGuides(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.ClearGuides;
End;

Function _MethodSetTool(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.SetTool(s[0],s[1],s[2]);
End;

Function _MethodSetCursor(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.SetCursor(s[0]);
End;

Function _MethodSetDragCursor(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.SetDragCursor(s[0]);
End;

Function _MethodCheckGuideLine(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.CheckGuideLine(s[0],s[1]);
End;

Function _MethodBeginHRulerDrag(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.BeginHRulerDrag;
End;

Function _MethodBeginVRulerDrag(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.BeginVRulerDrag;
End;

Function _MethodSurfaceWidth(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.SurfaceWidth;
End;

Function _MethodSurfaceHeight(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.SurfaceHeight;
End;

Function _MethodGetPageRect(slf:TObject;var APropName:String;var s:array of variant):variant;
  var Param0:Integer;
  var Param1:Integer;
  var Param2:Integer;
  var Param3:Integer;
Begin
  Param0 := Integer(s[0]);
  Param1 := Integer(s[1]);
  Param2 := Integer(s[2]);
  Param3 := Integer(s[3]);
  CadControl.GetPageRect(Param0,Param1,Param2,Param3);
  s[0] := Param0;
  s[1] := Param1;
  s[2] := Param2;
  s[3] := Param3;
End;

Function _MethodSetSurfaceMargin(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.SetSurfaceMargin(s[0]);
End;

Function _MethodSetScrollPositions(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.SetScrollPositions(s[0],s[1]);
End;

Function _MethodSetHScrollPosition(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.SetHScrollPosition(s[0],s[1]);
End;

Function _MethodSetVScrollPosition(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.SetVScrollPosition(s[0],s[1]);
End;

Function _MethodSetHScrollDelta(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.SetHScrollDelta(s[0],s[1]);
End;

Function _MethodSetVScrollDelta(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.SetVScrollDelta(s[0],s[1]);
End;

Function _MethodHSCBarPosition(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.HSCBarPosition;
End;

Function _MethodVSCBarPosition(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.VSCBarPosition;
End;

Function _MethodPointInHScroll(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.PointInHScroll(s[0],s[1]);
End;

Function _MethodPointInVScroll(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.PointInVScroll(s[0],s[1]);
End;

Function _MethodPointInHRuler(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.PointInHRuler(s[0],s[1]);
End;

Function _MethodPointInVRuler(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.PointInVRuler(s[0],s[1]);
End;

Function _MethodCenterLocation(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.CenterLocation(s[0],s[1]);
End;

Function _MethodPointInView(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.PointInView(s[0],s[1]);
End;

Function _MethodZoomDetailPoint(slf:TObject;var APropName:String;var s:array of variant):variant;
  var Param0:TDoublePoint;
Begin
  Param0 := DoublePoint(s[0],s[1]);
  CadControl.ZoomDetailPoint(Param0);
End;

Function _MethodHitTestModPointInt(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.HitTestModPointInt(s[0],s[1]);
End;

Function _MethodSimulateTrace(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.SimulateTrace(s[0],s[1]);
End;

Function _MethodSimulateDown(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.SimulateDown(s[0],s[1]);
End;

Function _MethodSimulateUp(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.SimulateUp(s[0],s[1]);
End;

Function _MethodSimulateRightClick(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.SimulateRightClick(s[0],s[1]);
End;

Function _MethodSetSelectionHatch(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.SetSelectionHatch(s[0],s[1],s[2],s[3]);
End;

Function _MethodSetSelectionGradient(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.SetSelectionGradient(s[0],s[1],s[2]);
End;

Function _MethodSetSelectionTexture(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.SetSelectionTexture(s[0],s[1]);
End;

Function _MethodNewLayer(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.NewLayer(s[0]);
End;

Function _MethodDeleteLayer(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.DeleteLayer(s[0]);
End;

Function _MethodDeleteLayerWithNbr(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.DeleteLayerWithNbr(s[0]);
End;

Function _MethodDeleteAllUserLayers(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.DeleteAllUserLayers;
End;

Function _MethodUnDo(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.UnDo;
End;

Function _MethodReDo(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.ReDo;
End;

Function _MethodClearUndoList(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.ClearUndoList;
End;

Function _MethodShowLayer(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.ShowLayer(s[0]);
End;

Function _MethodHideLayer(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.HideLayer(s[0]);
End;

Function _MethodHideAllLayers(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.HideAllLayers;
End;

Function _MethodGrayLayer(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.GrayLayer(s[0]);
End;

Function _MethodExGrayLayer(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.ExGrayLayer(s[0]);
End;

Function _MethodExHideLayer(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.ExHideLayer(s[0]);
End;

Function _MethodShowAllLayers(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.ShowAllLayers;
End;

Function _MethodMergeAllLayers(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.MergeAllLayers;
End;

Function _MethodMergeVisibleLayers(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.MergeVisibleLayers;
End;

Function _MethodGetLayerName(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.GetLayerName(s[0]);
End;

Function _MethodGetLayerHandle(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.GetLayerHandle(s[0]);
End;

Function _MethodGetLayerVisible(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.GetLayerVisible(s[0]);
End;

Function _MethodGetLayerGrayed(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.GetLayerGrayed(s[0]);
End;

Function _MethodGetSelectedHandle(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.GetSelectedHandle(s[0]);
End;

Function _MethodFigureGetHandle(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.FigureGetHandle(s[0]);
End;

Function _MethodFigureGetName(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.FigureGetName(s[0]);
End;

Function _MethodFigureGetClass(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.FigureGetClass(s[0]);
End;

Function _MethodFigureGetPointCount(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.FigureGetPointCount(s[0]);
End;

Function _MethodFigureGetPoint_X(slf:TObject;var APropName:String;var s:array of variant):variant;
var res:TDoublePoint;
Begin
  Res := CadControl.FigureGetPoint(s[0],s[1]);
  Result := Res.X;
End;

Function _MethodFigureGetPoint_Y(slf:TObject;var APropName:String;var s:array of variant):variant;
var res:TDoublePoint;
Begin
  Res := CadControl.FigureGetPoint(s[0],s[1]);
  Result := Res.Y;
End;

Function _MethodFigureGetDCPoint_X(slf:TObject;var APropName:String;var s:array of variant):variant;
var res:TDoublePoint;
Begin
  Res := CadControl.FigureGetDCPoint(s[0],s[1]);
  Result := Res.X;
End;

Function _MethodFigureGetDCPoint_Y(slf:TObject;var APropName:String;var s:array of variant):variant;
var res:TDoublePoint;
Begin
  Res := CadControl.FigureGetDCPoint(s[0],s[1]);
  Result := Res.Y;
End;

Function _MethodFigureGetCenter_X(slf:TObject;var APropName:String;var s:array of variant):variant;
var res:TDoublePoint;
Begin
  Res := CadControl.FigureGetCenter(s[0]);
  Result := Res.X;
End;

Function _MethodFigureGetCenter_Y(slf:TObject;var APropName:String;var s:array of variant):variant;
var res:TDoublePoint;
Begin
  Res := CadControl.FigureGetCenter(s[0]);
  Result := Res.Y;
End;

Function _MethodFigureGetRect_Left(slf:TObject;var APropName:String;var s:array of variant):variant;
var res:TDoubleRect;
Begin
  Res := CadControl.FigureGetRect(s[0]);
  Result := Res.Left;
End;

Function _MethodFigureGetRect_Top(slf:TObject;var APropName:String;var s:array of variant):variant;
var res:TDoubleRect;
Begin
  Res := CadControl.FigureGetRect(s[0]);
  Result := Res.Top;
End;

Function _MethodFigureGetRect_Right(slf:TObject;var APropName:String;var s:array of variant):variant;
var res:TDoubleRect;
Begin
  Res := CadControl.FigureGetRect(s[0]);
  Result := Res.Right;
End;

Function _MethodFigureGetRect_Bottom(slf:TObject;var APropName:String;var s:array of variant):variant;
var res:TDoubleRect;
Begin
  Res := CadControl.FigureGetRect(s[0]);
  Result := Res.Bottom;
End;

Function _MethodFigureGetRadius(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.FigureGetRadius(s[0]);
End;

Function _MethodFigureGetFontName(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.FigureGetFontName(s[0]);
End;

Function _MethodFigureGetFontBold(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.FigureGetFontBold(s[0]);
End;

Function _MethodFigureGetFontItalic(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.FigureGetFontItalic(s[0]);
End;

Function _MethodFigureGetFontUnderline(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.FigureGetFontUnderline(s[0]);
End;

Function _MethodFigureGetFontStrike(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.FigureGetFontStrike(s[0]);
End;

Function _MethodFigureGetFontSize(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.FigureGetFontSize(s[0]);
End;

Function _MethodFigureGetFontCharset(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.FigureGetFontCharset(s[0]);
End;

Function _MethodFigureGetFontColor(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.FigureGetFontColor(s[0]);
End;

Function _MethodFigureGetPenColor(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.FigureGetPenColor(s[0]);
End;

Function _MethodFigureGetBrushColor(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.FigureGetBrushColor(s[0]);
End;

Function _MethodFigureGetPenStyle(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.FigureGetPenStyle(s[0]);
End;

Function _MethodFigureGetBrushStyle(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.FigureGetBrushStyle(s[0]);
End;

Function _MethodFigureGetRowStyle(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.FigureGetRowStyle(s[0]);
End;

Function _MethodFigureGetPenWidth(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.FigureGetPenWidth(s[0]);
End;

Function _MethodFigureGetInfo(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.FigureGetInfo(s[0]);
End;

Function _MethodFigureGetAngle(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.FigureGetAngle(s[0]);
End;

Function _MethodFigureGetLayerHandle(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.FigureGetLayerHandle(s[0]);
End;

Function _MethodFigureGetDiagonal(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.FigureGetDiagonal(s[0]);
End;

Function _MethodFigureGetLockMove(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.FigureGetLockMove(s[0]);
End;

Function _MethodFigureGetLockModify(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.FigureGetLockModify(s[0]);
End;

Function _MethodFigureGetSelected(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.FigureGetSelected(s[0]);
End;

Function _MethodFigureTestPoint(slf:TObject;var APropName:String;var s:array of variant):variant;
  var Param1:TDoublePoint;
Begin
  Param1 := DoublePoint(s[1],s[2]);
  Result := CadControl.FigureTestPoint(s[0],Param1);
End;

Function _MethodFigureTestRect(slf:TObject;var APropName:String;var s:array of variant):variant;
  var Param1:TDoubleRect;
Begin
  Param1 := DoubleRect(s[1],s[2],s[3],s[4]);
  Result := CadControl.FigureTestRect(s[0],Param1);
End;

Function _MethodFigureGetRgnHandle(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.FigureGetRgnHandle(s[0]);
End;

Function _MethodFigureSelect(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.FigureSelect(s[0]);
End;

Function _MethodFigureSelectAsRotate(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.FigureSelectAsRotate(s[0]);
End;

Function _MethodFigureDeSelect(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.FigureDeSelect(s[0]);
End;

Function _MethodFigureEdit(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.FigureEdit(s[0]);
End;

Function _MethodFigureMove(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.FigureMove(s[0],s[1],s[2]);
End;

Function _MethodFigureRotate(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.FigureRotate(s[0],s[1]);
End;

Function _MethodFigureRotateByPoint(slf:TObject;var APropName:String;var s:array of variant):variant;
  var Param2:TDoublePoint;
Begin
  Param2 := DoublePoint(s[2],s[3]);
  CadControl.FigureRotateByPoint(s[0],s[1],Param2);
End;

Function _MethodFigureMirror(slf:TObject;var APropName:String;var s:array of variant):variant;
  var Param1:TDoublePoint;
  var Param2:TDoublePoint;
Begin
  Param1 := DoublePoint(s[1],s[2]);
  Param2 := DoublePoint(s[3],s[4]);
  CadControl.FigureMirror(s[0],Param1,Param2);
End;

Function _MethodFigureScale(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.FigureScale(s[0],s[1],s[2]);
End;

Function _MethodFigureScaleByPoint(slf:TObject;var APropName:String;var s:array of variant):variant;
  var Param3:TDoublepoint;
Begin
  Param3 := Doublepoint(s[3],s[4]);
  CadControl.FigureScaleByPoint(s[0],s[1],s[2],Param3);
End;

Function _MethodFigureSetFontName(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.FigureSetFontName(s[0],s[1]);
End;

Function _MethodFigureSetFontBold(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.FigureSetFontBold(s[0],s[1]);
End;

Function _MethodFigureSetFontItalic(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.FigureSetFontItalic(s[0],s[1]);
End;

Function _MethodFigureSetFontUnderline(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.FigureSetFontUnderline(s[0],s[1]);
End;

Function _MethodFigureSetFontStrike(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.FigureSetFontStrike(s[0],s[1]);
End;

Function _MethodFigureSetFontSize(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.FigureSetFontSize(s[0],s[1]);
End;

Function _MethodFigureSetFontCharset(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.FigureSetFontCharset(s[0],s[1]);
End;

Function _MethodFigureSetFontColor(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.FigureSetFontColor(s[0],s[1]);
End;

Function _MethodFigureSetPenColor(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.FigureSetPenColor(s[0],s[1]);
End;

Function _MethodFigureSetBrushColor(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.FigureSetBrushColor(s[0],s[1]);
End;

Function _MethodFigureSetPenStyle(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.FigureSetPenStyle(s[0],s[1]);
End;

Function _MethodFigureSetBrushStyle(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.FigureSetBrushStyle(s[0],s[1]);
End;

Function _MethodFigureSetRowStyle(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.FigureSetRowStyle(s[0],s[1]);
End;

Function _MethodFigureSetPenWidth(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.FigureSetPenWidth(s[0],s[1]);
End;

Function _MethodFigureSetPoint(slf:TObject;var APropName:String;var s:array of variant):variant;
  var Param2:TDoublePoint;
Begin
  Param2 := DoublePoint(s[2],s[3]);
  CadControl.FigureSetPoint(s[0],s[1],Param2);
End;

Function _MethodFigureSetInfo(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.FigureSetInfo(s[0],s[1]);
End;

Function _MethodFigureSetAngle(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.FigureSetAngle(s[0],s[1]);
End;

Function _MethodFigureSetLayerHandle(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.FigureSetLayerHandle(s[0],s[1]);
End;

Function _MethodFigureSetDiagonal(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.FigureSetDiagonal(s[0],s[1]);
End;

Function _MethodFigureSetLockMove(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.FigureSetLockMove(s[0],s[1]);
End;

Function _MethodFigureSetLockModify(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.FigureSetLockModify(s[0],s[1]);
End;

Function _MethodFigureSetRgnHandle(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.FigureSetRgnHandle(s[0],s[1]);
End;

Function _MethodGetDCPoint_X(slf:TObject;var APropName:String;var s:array of variant):variant;
var res:TDoublePoint;
  var Param0:TDoublePoint;
Begin
  Param0 := DoublePoint(s[0],s[1]);
  Res := CadControl.GetDCPoint(Param0);
  Result := Res.X;
End;

Function _MethodGetDCPoint_Y(slf:TObject;var APropName:String;var s:array of variant):variant;
var res:TDoublePoint;
  var Param0:TDoublePoint;
Begin
  Param0 := DoublePoint(s[0],s[1]);
  Res := CadControl.GetDCPoint(Param0);
  Result := Res.Y;
End;

Function _MethodGetDCLen(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.GetDCLen(s[0]);
End;

Function _MethodFigureGrpGetFigureCount(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.FigureGrpGetFigureCount(s[0]);
End;

Function _MethodFigureGrpGetFigureHandle(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.FigureGrpGetFigureHandle(s[0],s[1]);
End;

Function _MethodFigureGrpGetCombined(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.FigureGrpGetCombined(s[0]);
End;

Function _MethodFigureGrpSetCombined(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.FigureGrpSetCombined(s[0],s[1]);
End;

Function _MethodFigureGrpUngroup(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.FigureGrpUngroup(s[0]);
End;

Function _MethodFigureBlockGetBlockname(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.FigureBlockGetBlockname(s[0]);
End;

Function _MethodFigureGetJoin1(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.FigureGetJoin1(s[0]);
End;

Function _MethodFigureGetJoin2(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.FigureGetJoin2(s[0]);
End;

Function _MethodFigureSetJoin1(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.FigureSetJoin1(s[0],s[1]);
End;

Function _MethodFigureSetJoin2(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.FigureSetJoin2(s[0],s[1]);
End;

Function _MethodFigureGetClosed(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.FigureGetClosed(s[0]);
End;

Function _MethodFigureSetClosed(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.FigureSetClosed(s[0],s[1]);
End;

Function _MethodFigureGetControlPoint_X(slf:TObject;var APropName:String;var s:array of variant):variant;
var res:TDoublePoint;
Begin
  Res := CadControl.FigureGetControlPoint(s[0],s[1],s[2]);
  Result := Res.X;
End;

Function _MethodFigureGetControlPoint_Y(slf:TObject;var APropName:String;var s:array of variant):variant;
var res:TDoublePoint;
Begin
  Res := CadControl.FigureGetControlPoint(s[0],s[1],s[2]);
  Result := Res.Y;
End;

Function _MethodFigureSetControlPoints(slf:TObject;var APropName:String;var s:array of variant):variant;
  var Param2:TDoublePoint;
  var Param3:TDoublePoint;
Begin
  Param2 := DoublePoint(s[2],s[3]);
  Param3 := DoublePoint(s[4],s[5]);
  CadControl.FigureSetControlPoints(s[0],s[1],Param2,Param3);
End;

Function _MethodFigureGetSegmentType(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.FigureGetSegmentType(s[0],s[1]);
End;

Function _MethodFigureSetSegmentType(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.FigureSetSegmentType(s[0],s[1],s[2]);
End;

Function _MethodFigureInvertArcSegment(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.FigureInvertArcSegment(s[0],s[1]);
End;

Function _MethodFigureConvertPLBezier(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.FigureConvertPLBezier(s[0]);
End;

Function _MethodFigureConvertPLPolyline(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.FigureConvertPLPolyline(s[0]);
End;

Function _MethodFigureGetElpALen(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.FigureGetElpALen(s[0]);
End;

Function _MethodFigureGetElpBLen(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.FigureGetElpBLen(s[0]);
End;

Function _MethodFigureGetArcStyle(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.FigureGetArcStyle(s[0]);
End;

Function _MethodFigureSetArcStyle(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.FigureSetArcStyle(s[0],s[1]);
End;

Function _MethodFigureInvertArc(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.FigureInvertArc(s[0]);
End;

Function _MethodFigureGetArcSAngle(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.FigureGetArcSAngle(s[0]);
End;

Function _MethodFigureGetArcFAngle(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.FigureGetArcFAngle(s[0]);
End;

Function _MethodFigureSetArcAngles(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.FigureSetArcAngles(s[0],s[1],s[2]);
End;

Function _MethodFigureGetRichText(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.FigureGetRichText(s[0]);
End;

Function _MethodFigureSetRichText(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.FigureSetRichText(s[0],s[1]);
End;

Function _MethodFigureGetPictureName(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.FigureGetPictureName(s[0]);
End;

Function _MethodFigureGetTransparent(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.FigureGetTransparent(s[0]);
End;

Function _MethodFigureSetTransparent(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.FigureSetTransparent(s[0],s[1]);
End;

Function _MethodFigureFlipHorz(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.FigureFlipHorz(s[0]);
End;

Function _MethodFigureFlipVert(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.FigureFlipVert(s[0]);
End;

Function _MethodFigureSkewBitmap(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.FigureSkewBitmap(s[0]);
End;

Function _MethodFigureSaveBitmapToFile(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.FigureSaveBitmapToFile(s[0],s[1]);
End;

Function _MethodFigureLoadBitmapFromFile(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.FigureLoadBitmapFromFile(s[0],s[1]);
End;

Function _MethodFigureGetText(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.FigureGetText(s[0]);
End;

Function _MethodFigureSetText(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.FigureSetText(s[0],s[1]);
End;

Function _MethodDrawUserFigureEvent(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.DrawUserFigureEvent(s[0],s[1],s[2],s[3]);
End;

Function _MethodPointInUserFigureEvent(slf:TObject;var APropName:String;var s:array of variant):variant;
  var Param4:Boolean;
Begin
  Param4 := Boolean(s[4]);
  Result := CadControl.PointInUserFigureEvent(s[0],s[1],s[2],s[3],Param4);
  s[4] := Param4;
End;

Function _MethodDraw(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.Draw;
End;

Function _MethodDrawFigures(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.DrawFigures;
End;

Function _MethodDrawSelectedFigures(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.DrawSelectedFigures;
End;

Function _MethodDrawSelectionPoints(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.DrawSelectionPoints;
End;

Function _MethodDrawFigureGuides(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.DrawFigureGuides;
End;

Function _MethodSelectAll(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.SelectAll(s[0]);
End;

Function _MethodDeselectAll(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.DeselectAll(s[0]);
End;

Function _MethodInvertSelection(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.InvertSelection;
End;

Function _MethodGroupSelection(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.GroupSelection;
End;

Function _MethodUngroupSelection(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.UngroupSelection;
End;

Function _MethodOrderSelection(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.OrderSelection(s[0]);
End;

Function _MethodRemoveSelection(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.RemoveSelection;
End;

Function _MethodRotateSelectionCenter(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.RotateSelectionCenter(s[0]);
End;

Function _MethodRotateSelection(slf:TObject;var APropName:String;var s:array of variant):variant;
  var Param1:TDoublePoint;
Begin
  Param1 := DoublePoint(s[1],s[2]);
  CadControl.RotateSelection(s[0],Param1);
End;

Function _MethodMirrorSelection(slf:TObject;var APropName:String;var s:array of variant):variant;
  var Param0:TDoublePoint;
  var Param1:TDoublePoint;
Begin
  Param0 := DoublePoint(s[0],s[1]);
  Param1 := DoublePoint(s[2],s[3]);
  CadControl.MirrorSelection(Param0,Param1,s[4]);
End;

Function _MethodKnifeSelection(slf:TObject;var APropName:String;var s:array of variant):variant;
  var Param0:TDoublePoint;
  var Param1:TDoublePoint;
Begin
  Param0 := DoublePoint(s[0],s[1]);
  Param1 := DoublePoint(s[2],s[3]);
  CadControl.KnifeSelection(Param0,Param1);
End;

Function _MethodCreateDimLinesOfSelection(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.CreateDimLinesOfSelection;
End;

Function _MethodClearDimLinesOfSelection(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.ClearDimLinesOfSelection;
End;

Function _MethodInterBreakSelection(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.InterBreakSelection;
End;

Function _MethodLockSelectionToMove(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.LockSelectionToMove(s[0]);
End;

Function _MethodLockSelectionToModify(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.LockSelectionToModify(s[0]);
End;

Function _MethodInvertArcsOfSelection(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.InvertArcsOfSelection;
End;

Function _MethodArrangeArcStyleOfSelection(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.ArrangeArcStyleOfSelection(s[0]);
End;

Function _MethodCloseSelectedPolyline(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.CloseSelectedPolyline;
End;

Function _MethodOpenSelectedPolyline(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.OpenSelectedPolyline;
End;

Function _MethodSimplfySelectedPolyline(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.SimplfySelectedPolyline;
End;

Function _MethodNameSelection(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.NameSelection;
End;

Function _MethodConvertPLToBezier(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.ConvertPLToBezier;
End;

Function _MethodConvertPLToPolyline(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.ConvertPLToPolyline;
End;

Function _MethodFlipImagesOfSelection(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.FlipImagesOfSelection(s[0]);
End;

Function _MethodsetTransparentOfSelection(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.setTransparentOfSelection(s[0]);
End;

Function _MethodScaleSelection(slf:TObject;var APropName:String;var s:array of variant):variant;
  var Param2:TDoublePoint;
Begin
  Param2 := DoublePoint(s[2],s[3]);
  CadControl.ScaleSelection(s[0],s[1],Param2);
End;

Function _MethodScaleDrawing(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.ScaleDrawing(s[0],s[1]);
End;

Function _MethodModifyFontName(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.ModifyFontName(s[0]);
End;

Function _MethodModifyFontBold(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.ModifyFontBold(s[0]);
End;

Function _MethodModifyFontItalic(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.ModifyFontItalic(s[0]);
End;

Function _MethodModifyFontUnderline(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.ModifyFontUnderline(s[0]);
End;

Function _MethodModifyFontStrike(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.ModifyFontStrike(s[0]);
End;

Function _MethodModifyFontSize(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.ModifyFontSize(s[0]);
End;

Function _MethodModifyFontCharset(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.ModifyFontCharset(s[0]);
End;

Function _MethodModifyFontColor(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.ModifyFontColor(s[0]);
End;

Function _MethodModifyPenColor(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.ModifyPenColor(s[0]);
End;

Function _MethodModifyBrushColor(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.ModifyBrushColor(s[0]);
End;

Function _MethodModifyPenStyle(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.ModifyPenStyle(s[0]);
End;

Function _MethodModifyBrushStyle(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.ModifyBrushStyle(s[0]);
End;

Function _MethodModifyRowStyle(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.ModifyRowStyle(s[0]);
End;

Function _MethodModifyPenWidth(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.ModifyPenWidth(s[0]);
End;

Function _MethodIsTextSelected(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.IsTextSelected;
End;

Function _MethodGetSelectionBoundS(slf:TObject;var APropName:String;var s:array of variant):variant;
  var Param0:Double;
  var Param1:Double;
  var Param2:Double;
  var Param3:Double;
Begin
  Param0 := Double(s[0]);
  Param1 := Double(s[1]);
  Param2 := Double(s[2]);
  Param3 := Double(s[3]);
  CadControl.GetSelectionBoundS(Param0,Param1,Param2,Param3);
  s[0] := Param0;
  s[1] := Param1;
  s[2] := Param2;
  s[3] := Param3;
End;

Function _MethodGetDrawingBounds(slf:TObject;var APropName:String;var s:array of variant):variant;
  var Param0:Double;
  var Param1:Double;
  var Param2:Double;
  var Param3:Double;
Begin
  Param0 := Double(s[0]);
  Param1 := Double(s[1]);
  Param2 := Double(s[2]);
  Param3 := Double(s[3]);
  CadControl.GetDrawingBounds(Param0,Param1,Param2,Param3);
  s[0] := Param0;
  s[1] := Param1;
  s[2] := Param2;
  s[3] := Param3;
End;

Function _MethodReDrawSelection(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.ReDrawSelection;
End;

Function _MethodReDrawSelectionPoints(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.ReDrawSelectionPoints;
End;

Function _MethodManualRefresh(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.ManualRefresh;
End;

Function _MethodRefreshSelection(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.RefreshSelection;
End;

Function _MethodReselect(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.Reselect;
End;

Function _MethodGetSurfaceBitmapHandle(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.GetSurfaceBitmapHandle;
End;

Function _MethodSelectByPoint(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.SelectByPoint(s[0],s[1],s[2],s[3]);
End;

Function _MethodDoMagicWand(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.DoMagicWand(s[0],s[1],s[2]);
End;

Function _MethodSelectByFigure(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.SelectByFigure(s[0],s[1],s[2]);
End;

Function _MethodSelectWithInArea(slf:TObject;var APropName:String;var s:array of variant):variant;
  var Param1:TDoubleRect;
Begin
  Param1 := DoubleRect(s[1],s[2],s[3],s[4]);
  Result := CadControl.SelectWithInArea(s[0],Param1,s[5]);
End;

Function _MethodSelectFigure(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.SelectFigure(s[0]);
End;

Function _MethodDeSelectFigure(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.DeSelectFigure(s[0]);
End;

Function _MethodMoveSelection(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.MoveSelection(s[0],s[1]);
End;

Function _MethodMoveAll(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.MoveAll(s[0],s[1]);
End;

Function _MethodMoveAllSilent(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.MoveAllSilent(s[0],s[1]);
End;

Function _MethodDuplicateSelection(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.DuplicateSelection(s[0],s[1]);
End;

Function _MethodDuplicateSelectionAsBezier(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.DuplicateSelectionAsBezier(s[0],s[1]);
End;

Function _MethodConvertSelectionToBezier(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.ConvertSelectionToBezier;
End;

Function _MethodArrayRectSelection(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.ArrayRectSelection(s[0],s[1],s[2],s[3]);
End;

Function _MethodArrayPolarSelection(slf:TObject;var APropName:String;var s:array of variant):variant;
  var Param0:TDoublePoint;
Begin
  Param0 := DoublePoint(s[0],s[1]);
  CadControl.ArrayPolarSelection(Param0,s[2]);
End;

Function _MethodMakeSelectionBlock(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.MakeSelectionBlock(s[0]);
End;

Function _MethodBoundSelectedLine(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.BoundSelectedLine;
End;

Function _MethodBoundLineToFigures(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.BoundLineToFigures(s[0],s[1],s[2]);
End;

Function _MethodBoundLinePoint(slf:TObject;var APropName:String;var s:array of variant):variant;
  var Param2:TDoublepoint;
Begin
  Param2 := Doublepoint(s[2],s[3]);
  CadControl.BoundLinePoint(s[0],s[1],Param2);
End;

Function _MethodUnBoundLine(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.UnBoundLine;
End;

Function _MethodMakeSelectedLinesPolyline(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.MakeSelectedLinesPolyline;
End;

Function _MethodWeldIntoPolyline(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.WeldIntoPolyline;
End;

Function _MethodOffSetSelection(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.OffSetSelection(s[0]);
End;

Function _MethodClipSelBitmapToSelFigure(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.ClipSelBitmapToSelFigure;
End;

Function _MethodUnClipSelBitmap(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.UnClipSelBitmap;
End;

Function _MethodSaveToFile(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.SaveToFile(s[0],s[1]);
End;

Function _MethodLoadFromFile(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.LoadFromFile(s[0]);
End;

Function _MethodInsertBlockwithFileName(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.InsertBlockwithFileName(s[0],s[1],s[2],s[3]);
End;

Function _MethodSetBlockInfo(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.SetBlockInfo(s[0],s[1]);
End;

Function _MethodExportAsWmf(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.ExportAsWmf(s[0]);
End;

Function _MethodExportAsDxf(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.ExportAsDxf(s[0]);
End;

Function _MethodSelectionAsMetaFile(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.SelectionAsMetaFile;
End;

Function _MethodDrawingAsMetaFile(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.DrawingAsMetaFile;
End;

Function _MethodFigureAsMetaFile(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.FigureAsMetaFile(s[0]);
End;

Function _MethodSelectionAsBmpHandle(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.SelectionAsBmpHandle(s[0]);
End;

Function _MethodSaveAsBitmap(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.SaveAsBitmap(s[0]);
End;

Function _MethodCreatePreviewBitmapHandle(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.CreatePreviewBitmapHandle;
End;

Function _MethodDrawToDC(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.DrawToDC(s[0],s[1],s[2],s[3]);
End;

Function _MethodStretchToDC(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.StretchToDC(s[0],s[1],s[2],s[3],s[4]);
End;

Function _MethodPrintDrawing(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.PrintDrawing(s[0]);
End;

Function _MethodPrintDrawingAsWmf(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.PrintDrawingAsWmf(s[0]);
End;

Function _MethodPrnStartJob(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.PrnStartJob(s[0]);
End;

Function _MethodPrnDoJob(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.PrnDoJob(s[0]);
End;

Function _MethodPrnEndJob(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.PrnEndJob;
End;

Function _MethodPrnAbortJob(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.PrnAbortJob;
End;

Function _MethodPrintByTiling(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.PrintByTiling(s[0],s[1],s[2]);
End;

Function _MethodImportDXF(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.ImportDXF(s[0],s[1],s[2]);
End;

Function _MethodClear(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.Clear(s[0]);
End;

Function _MethodCopyToClipBoard(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.CopyToClipBoard;
End;

Function _MethodCutToClipBoard(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.CutToClipBoard;
End;

Function _MethodSetFieldText(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.SetFieldText(s[0],s[1]);
End;

Function _MethodPasteFromClipBoard(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.PasteFromClipBoard(s[0]);
End;

Function _MethodGetLayerNbr(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.GetLayerNbr(s[0]);
End;

Function _MethodFindFigureByName(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.FindFigureByName(s[0]);
End;

Function _MethodLine(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.Line(s[0],s[1],s[2],s[3],s[4],s[5],s[6],s[7],s[8],s[9]);
End;

Function _MethodVertex(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.Vertex(s[0],s[1],s[2],s[3]);
End;

Function _MethodEllipse(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.Ellipse(s[0],s[1],s[2],s[3],s[4],s[5],s[6],s[7],s[8],s[9],s[10],s[11]);
End;

Function _MethodDrawCircle(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.DrawCircle(s[0],s[1],s[2],s[3],s[4],s[5],s[6],s[7],s[8],s[9]);
End;

Function _MethodArc(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.Arc(s[0],s[1],s[2],s[3],s[4],s[5],s[6],s[7],s[8],s[9],s[10],s[11],s[12]);
End;

Function _MethodElpArc(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.ElpArc(s[0],s[1],s[2],s[3],s[4],s[5],s[6],s[7],s[8],s[9],s[10],s[11],s[12],s[13],s[14]);
End;

Function _MethodRectangle(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.Rectangle(s[0],s[1],s[2],s[3],s[4],s[5],s[6],s[7],s[8],s[9],s[10]);
End;

Function _MethodInsertBitmap(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.InsertBitmap(s[0],s[1],s[2],s[3],s[4],s[5]);
End;

Function _MethodInsertBitmapHandle(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.InsertBitmapHandle(s[0],s[1],s[2],s[3],s[4],s[5]);
End;

Function _MethodInsertWMF(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.InsertWMF(s[0],s[1],s[2],s[3],s[4]);
End;

Function _MethodImportWMF(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.ImportWMF(s[0],s[1],s[2]);
End;

Function _MethodImportDrawing(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.ImportDrawing(s[0],s[1],s[2],s[3],s[4]);
End;

Function _MethodTextOut(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.TextOut(s[0],s[1],s[2],s[3],s[4],s[5],s[6],s[7],s[8],s[9],s[10]);
End;

Function _MethodGetFigureCustomStream(slf:TObject;var APropName:String;var s:array of variant):variant;
  var Param1:Integer;
Begin
  Param1 := Integer(s[1]);
  Result := CadControl.GetFigureCustomStream(s[0],Param1);
  s[1] := Param1;
End;

Function _MethodSetFigureCustomStream(slf:TObject;var APropName:String;var s:array of variant):variant;
  var Param2:Byte;
Begin
  Param2 := Byte(s[2]);
  CadControl.SetFigureCustomStream(s[0],s[1],Param2);
  s[2] := Param2;
End;

Function _MethodGetCustomStream(slf:TObject;var APropName:String;var s:array of variant):variant;
  var Param0:Integer;
Begin
  Param0 := Integer(s[0]);
  Result := CadControl.GetCustomStream(Param0);
  s[0] := Param0;
End;

Function _MethodSetCustomStream(slf:TObject;var APropName:String;var s:array of variant):variant;
  var Param1:Byte;
Begin
  Param1 := Byte(s[1]);
  CadControl.SetCustomStream(s[0],Param1);
  s[1] := Param1;
End;

Function _MethodPrintPreview(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.PrintPreview;
End;

Function _MethodGetSlcPenStyle(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.GetSlcPenStyle;
End;

Function _MethodGetSlcPenWidth(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.GetSlcPenWidth;
End;

Function _MethodGetSlcPenColor(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.GetSlcPenColor;
End;

Function _MethodGetSlcRowStyle(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.GetSlcRowStyle;
End;

Function _MethodGetSlcBrushStyle(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.GetSlcBrushStyle;
End;

Function _MethodGetSlcBrushColor(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.GetSlcBrushColor;
End;

Function _MethodGetSlcFontName(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.GetSlcFontName;
End;

Function _MethodGetSlcFontBold(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.GetSlcFontBold;
End;

Function _MethodGetSlcFontItalic(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.GetSlcFontItalic;
End;

Function _MethodGetSlcFontStrike(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.GetSlcFontStrike;
End;

Function _MethodGetSlcFontSize(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.GetSlcFontSize;
End;

Function _MethodGetSlcFontColor(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.GetSlcFontColor;
End;

Function _MethodGetSlcPolylineClosed(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.GetSlcPolylineClosed;
End;

Function _MethodGetSlcImageTransparent(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.GetSlcImageTransparent;
End;

Function _MethodGetSlcImageClipped(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.GetSlcImageClipped;
End;

Function _MethodGetSlcArcStyle(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.GetSlcArcStyle;
End;

Function _MethodGetSlcLineBounded(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.GetSlcLineBounded;
End;

Function _MethodCountBlock(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.CountBlock(s[0]);
End;

Function _MethodExecuteTBCommand(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.ExecuteTBCommand(s[0]);
End;

Function _MethodGetVersion(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.GetVersion;
End;

Function _MethodGetBuildNumber(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.GetBuildNumber;
End;

Function _MethodBlockAsMetafile(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.BlockAsMetafile(s[0]);
End;

Function _MethodLockSelChange(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.LockSelChange;
End;

Function _MethodUnLockSelChange(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.UnLockSelChange;
End;

Function _MethodCenterPage(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.CenterPage;
End;

Function _MethodAlignPageDown(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.AlignPageDown;
End;

Function _MethodAlignPageUp(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.AlignPageUp;
End;

Function _MethodStartBlink(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.StartBlink;
End;

Function _MethodStopBlink(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.StopBlink;
End;

Function _MethodResumeBlink(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.ResumeBlink;
End;

Function _MethodIsBlinking(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.IsBlinking;
End;

Function _MethodCalibrateLayerScale(slf:TObject;var APropName:String;var s:array of variant):variant;
  var Param0:TDoublePoint;
  var Param1:TDoublePoint;
Begin
  Param0 := DoublePoint(s[0],s[1]);
  Param1 := DoublePoint(s[2],s[3]);
  CadControl.CalibrateLayerScale(Param0,Param1,s[4]);
End;

Function _MethodcNewDrawing(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.cNewDrawing;
End;

Function _MethodcOpenDrawing(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.cOpenDrawing;
End;

Function _MethodcOpenDrawingFile(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.cOpenDrawingFile(s[0]);
End;

Function _MethodcSaveDrawing(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.cSaveDrawing;
End;

Function _MethodcSaveAsDrawing(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.cSaveAsDrawing;
End;

Function _MethodcPrintDrawing(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.cPrintDrawing;
End;

Function _MethodcPrintDrawingAsWmf(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.cPrintDrawingAsWmf;
End;

Function _MethodcTestPrinter(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.cTestPrinter;
End;

Function _MethodcExportAs(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.cExportAs;
End;

Function _MethodcImportDxf(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.cImportDxf;
End;

Function _MethodDoPopUp(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.DoPopUp(s[0],s[1]);
End;

Function _MethodExecuteCustomCommand(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.ExecuteCustomCommand(s[0]);
End;

Function _MethodExecuteVerbalCommand(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  CadControl.ExecuteVerbalCommand(s[0]);
End;

Function _MethodExitApplication(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.ExitApplication;
End;

Function _MethodIsUnNamed(slf:TObject;var APropName:String;var s:array of variant):variant;
Begin
  Result := CadControl.IsUnNamed;
End;




/////////////////////

procedure InitPowerCad;
begin

  AddConst('gtNone',gtNone);
  AddConst('gtNinty',gtNinty);
  AddConst('gtThirty',gtThirty);
  AddConst('gtFortyFive',gtFortyFive);
  AddConst('gtSixty',gtSixty);
  AddConst('plA0',plA0);
  AddConst('plA1',plA1);
  AddConst('plA2',plA2);
  AddConst('plA3',plA3);
  AddConst('plA4',plA4);
  AddConst('plA5',plA5);
  AddConst('plA6',plA6);
  AddConst('plB4',plB4);
  AddConst('plB5',plB5);
  AddConst('plTabloid',plTabloid);
  AddConst('plLetter',plLetter);
  AddConst('plCustom',plCustom);
  AddConst('poLandscape',poLandscape);
  AddConst('poPortrait',poPortrait);
  AddConst('toSelect',toSelect);
  AddConst('toSelect',toFigure);
  AddConst('toOperation',toOperation);
  AddConst('toZoom',toZoom);
  AddConst('toInsertBlock',toInsertBlock);
  AddConst('fmVert',fmVert);
  AddConst('fmHorz',fmHorz);

  AddConst('haNoChange',haNoChange);
  AddConst('haTop',haTop);
  AddConst('haBottom',haBottom);
  AddConst('haCenter',haCenter);
  AddConst('haDistHorz',haDistHorz);
  AddConst('vaNoChange',vaNoChange);
  AddConst('vaLeft',vaLeft);
  AddConst('vaRight',vaRight);
  AddConst('vaCenter',vaCenter);
  AddConst('vaDistVert',vaDistVert);

  AddConst('psSolid',psSolid);
  AddConst('psDash',psDash);
  AddConst('psDot',psDot);
  AddConst('psDashDot',psDashDot);
  AddConst('psDashDotDot',psDashDotDot);
  AddConst('psClear',psClear);

  AddConst('bsSolid',bsSolid);
  AddConst('bsCross',bsCross);
  AddConst('bsClear',bsClear);
  AddConst('bsDiagCross',bsDiagCross);
  AddConst('bsBDiagonal',bsBDiagonal);
  AddConst('bsHorizontal',bsHorizontal);
  AddConst('bsFDiagonal',bsFDiagonal);
  AddConst('bsVertical',bsVertical);


  AddConst('rsNone',rsNone);
  AddConst('rsRightSolid',rsRightSolid);
  AddConst('rsLeftSolid',rsLeftSolid);
  AddConst('rsBothSolid',rsBothSolid);
  AddConst('rsRightLight',rsRightLight);
  AddConst('rsLeftLight',rsLeftLight);
  AddConst('rsBothLight',rsBothLight);

  AddConst('ANSI_CHARSET',0);
  AddConst('DEFAULT_CHARSET',1);
  AddConst('SYMBOL_CHARSET',2);
  AddConst('MAC_CHARSET',77);
  AddConst('SHIFTJIS_CHARSET',128);
  AddConst('HANGEUL_CHARSET',129);
  AddConst('JOHAB_CHARSET',130);

  AddConst('GB2312_CHARSET',134);
  AddConst('CHINESEBIG5_CHARSET',136);
  AddConst('GREEK_CHARSET',161);
  AddConst('TURKISH_CHARSET',162);
  AddConst('VIETNAMESE_CHARSET',163);
  AddConst('HEBREW_CHARSET',177);
  AddConst('ARABIC_CHARSET',178);

  AddConst('BALTIC_CHARSET',186);
  AddConst('RUSSIAN_CHARSET',204);
  AddConst('THAI_CHARSET',222);
  AddConst('EASTEUROPE_CHARSET',238);
  AddConst('OEM_CHARSET',255);
  AddProc('SetPointArray',MySetPointArray,[0,0,0]);
  AddProc('FillPointArray',MyFillPointArray,[0]);
  AddFun('PolyLine',_MethodPolyLine,[0,0,0,0,0,0,0,0,0]);
  AddProp('DotsPerMil',_GetPropDotsPerMil,nil);
  AddProp('Locked',_GetPropLocked,_SetPropLocked);
  AddProp('Updated',_GetPropUpdated,_SetPropUpdated);
  AddProp('AutoRefresh',_GetPropAutoRefresh,_SetPropAutoRefresh);
  AddProp('RulerVisible',_GetPropRulerVisible,_SetPropRulerVisible);
  AddProp('VerticalZero',_GetPropVerticalZero,_SetPropVerticalZero);
  AddProp('HorizontalZero',_GetPropHorizontalZero,_SetPropHorizontalZero);
  AddProp('ToolIdx',_GetPropToolIdx,nil);
  AddProp('ToolInfo',_GetPropToolInfo,nil);
  AddProp('ToolData',_GetPropToolData,nil);
  AddProp('DotsPerMilOrig',_GetPropDotsPerMilOrig,_SetPropDotsPerMilOrig);
  AddProp('ActiveLayer',_GetPropActiveLayer,_SetPropActiveLayer);
  AddProp('ZoomScale',_GetPropZoomScale,_SetPropZoomScale);
  AddProp('GuidesVisible',_GetPropGuidesVisible,_SetPropGuidesVisible);
  AddProp('BackGround',_GetPropBackGround,_SetPropBackGround);
  AddProp('PageColor',_GetPropPageColor,_SetPropPageColor);
  AddProp('Grids',_GetPropGrids,_SetPropGrids);
  AddProp('GridType',_GetPropGridType,_SetPropGridType);
  AddProp('CenterGuide',_GetPropCenterGuide,_SetPropCenterGuide);
  AddProp('PageGuide',_GetPropPageGuide,_SetPropPageGuide);
  AddProp('DrawShadow',_GetPropDrawShadow,_SetPropDrawShadow);
  AddProp('DrawPageBorder',_GetPropDrawPageBorder,_SetPropDrawPageBorder);
  AddProp('GridColor',_GetPropGridColor,_SetPropGridColor);
  AddProp('GuideColor',_GetPropGuideColor,_SetPropGuideColor);
  AddProp('RulerColor',_GetPropRulerColor,_SetPropRulerColor);
  AddProp('GridStep',_GetPropGridStep,_SetPropGridStep);
  AddProp('WorkHeight',_GetPropWorkHeight,_SetPropWorkHeight);
  AddProp('WorkWidth',_GetPropWorkWidth,_SetPropWorkWidth);
  AddProp('PageLayout',_GetPropPageLayout,_SetPropPageLayout);
  AddProp('PageOrient',_GetPropPageOrient,_SetPropPageOrient);
  AddProp('GuideTrace',_GetPropGuideTrace,_SetPropGuideTrace);
  AddProp('SnapToGuides',_GetPropSnapToGuides,_SetPropSnapToGuides);
  AddProp('SnapToNearPoint',_GetPropSnapToNearPoint,_SetPropSnapToNearPoint);
  AddProp('SnapToGrids',_GetPropSnapToGrids,_SetPropSnapToGrids);
  AddProp('ScrollBars',_GetPropScrollBars,_SetPropScrollBars);
  AddProp('RulerSystem',_GetPropRulerSystem,_SetPropRulerSystem);
  AddProp('DrawInCursor',_GetPropDrawInCursor,_SetPropDrawInCursor);
  AddProp('RealScale',_GetPropRealScale,_SetPropRealScale);
  AddProp('MetricMode',_GetPropMetricMode,_SetPropMetricMode);
  AddProp('AngularMode',_GetPropAngularMode,_SetPropAngularMode);
  AddProp('WmfPrinting',_GetPropWmfPrinting,_SetPropWmfPrinting);
  AddProp('DefaultPenColor',_GetPropDefaultPenColor,_SetPropDefaultPenColor);
  AddProp('DefaultBrushColor',_GetPropDefaultBrushColor,_SetPropDefaultBrushColor);
  AddProp('DefaultPenWidth',_GetPropDefaultPenWidth,_SetPropDefaultPenWidth);
  AddProp('DefaultPenStyle',_GetPropDefaultPenStyle,_SetPropDefaultPenStyle);
  AddProp('DefaultBrushStyle',_GetPropDefaultBrushStyle,_SetPropDefaultBrushStyle);
  AddProp('DefaultRowStyle',_GetPropDefaultRowStyle,_SetPropDefaultRowStyle);
  AddProp('DefaultTextHeight',_GetPropDefaultTextHeight,_SetPropDefaultTextHeight);
  AddProp('DefaultTextRatio',_GetPropDefaultTextRatio,_SetPropDefaultTextRatio);
  AddProp('DefaultPLineClosed',_GetPropDefaultPLineClosed,_SetPropDefaultPLineClosed);
  AddProp('DefaultArcStyle',_GetPropDefaultArcStyle,_SetPropDefaultArcStyle);
  AddProp('LayerCount',_GetPropLayerCount,nil);
  AddProp('FigureCount',_GetPropFigureCount,nil);
  AddProp('SelectedCount',_GetPropSelectedCount,nil);
  AddProp('MapScale',_GetPropMapScale,_SetPropMapScale);
  AddProp('RescaleToMap',_GetPropRescaleToMap,_SetPropRescaleToMap);
  AddProp('AutoSelect',_GetPropAutoSelect,_SetPropAutoSelect);
  AddProp('KeyCommands',_GetPropKeyCommands,_SetPropKeyCommands);
  AddProp('RecordUndo',_GetPropRecordUndo,_SetPropRecordUndo);
  AddProp('UndoCount',_GetPropUndoCount,_SetPropUndoCount);
  AddProp('DefaultPictureFolder',_GetPropDefaultPictureFolder,_SetPropDefaultPictureFolder);
  AddProp('SaveWithPreview',_GetPropSaveWithPreview,_SetPropSaveWithPreview);
  AddProp('RulerMode',_GetPropRulerMode,_SetPropRulerMode);
  AddProp('ZoomRect',_GetPropZoomRect,_SetPropZoomRect);
  AddProp('RangeCheck',_GetPropRangeCheck,_SetPropRangeCheck);
  AddProp('AutoTilePrint',_GetPropAutoTilePrint,_SetPropAutoTilePrint);
  AddProp('FigureGuides',_GetPropFigureGuides,_SetPropFigureGuides);
  AddProp('NativeFill',_GetPropNativeFill,_SetPropNativeFill);
  AddProp('ActiveFile',_GetPropActiveFile,_SetPropActiveFile);
  AddProp('CurrentColor',_GetPropCurrentColor,_SetPropCurrentColor);
  AddProp('CurrentStyle',_GetPropCurrentStyle,_SetPropCurrentStyle);
  AddProp('CurrentString',_GetPropCurrentString,_SetPropCurrentString);
  AddProp('CurrentFlag',_GetPropCurrentFlag,_SetPropCurrentFlag);
  AddProp('CurrentFileName',_GetPropCurrentFileName,_SetPropCurrentFileName);
  AddProp('CurrentValue',_GetPropCurrentValue,_SetPropCurrentValue);
  AddProp('FileExtension',_GetPropFileExtension,_SetPropFileExtension);
  AddProp('MultiSelect',_GetPropMultiSelect,_SetPropMultiSelect);
  AddProp('OpenDialogTitle',_GetPropOpenDialogTitle,_SetPropOpenDialogTitle);
  AddProp('OpenDialogFilter',_GetPropOpenDialogFilter,_SetPropOpenDialogFilter);
  AddProp('SaveDialogTitle',_GetPropSaveDialogTitle,_SetPropSaveDialogTitle);
  AddProp('SaveDialogFilter',_GetPropSaveDialogFilter,_SetPropSaveDialogFilter);
  AddProp('AcceptFiles',_GetPropAcceptFiles,_SetPropAcceptFiles);
  AddProp('MouseCommands',_GetPropMouseCommands,_SetPropMouseCommands);
  AddProp('PopStyle',_GetPropPopStyle,_SetPropPopStyle);
  AddProp('CustomPopItems',_GetPropCustomPopItems,_SetPropCustomPopItems);
  AddProp('MirrorStraight',_GetPropMirrorStraight,_SetPropMirrorStraight);
  AddProp('DrawingPop',_GetPropDrawingPop,_SetPropDrawingPop);
  AddProc('PrintMessage',_MethodPrintMessage,[0]);
  AddProc('Refresh',_MethodRefresh,[2]);
  AddFun('ClientToScreen_X',_MethodClientToScreen_X,[0,0]);
  AddFun('ClientToScreen_Y',_MethodClientToScreen_Y,[0,0]);
  AddFun('ScreenToClient_X',_MethodScreenToClient_X,[0,0]);
  AddFun('ScreenToClient_Y',_MethodScreenToClient_Y,[0,0]);
  AddProc('SetCustomSurface',_MethodSetCustomSurface,[0,0]);
  AddProc('DoResize',_MethodDoResize,[2]);
  AddProc('SaveScroll',_MethodSaveScroll,[2]);
  AddProc('RestoreScroll',_MethodRestoreScroll,[2]);
  AddProc('ReLocate',_MethodReLocate,[2]);
  AddProc('DoSurfaceMove',_MethodDoSurfaceMove,[0,0,0]);
  AddProc('DoSurfaceClick',_MethodDoSurfaceClick,[2]);
  AddProc('DoSurfaceDblClick',_MethodDoSurfaceDblClick,[2]);
  AddProc('DoSurfaceLeave',_MethodDoSurfaceLeave,[2]);
  AddProc('DoSurfaceDragDrop',_MethodDoSurfaceDragDrop,[0,0,0]);
  AddProc('DoSurfacePull',_MethodDoSurfacePull,[0,0,0,0]);
  AddProc('DoSurfacePush',_MethodDoSurfacePush,[0,0,0,0]);
  AddProc('DoSurfaceWheel',_MethodDoSurfaceWheel,[0,0,0,0]);
  AddFun('DoKeyStroke',_MethodDoKeyStroke,[0,0]);
  AddFun('CheckForGuideDrop',_MethodCheckForGuideDrop,[0,0]);
  AddProc('DragStarted',_MethodDragStarted,[2]);
  AddFun('GetSelectionRect_Left',_MethodGetSelectionRect_Left,[2]);
  AddFun('GetSelectionRect_Right',_MethodGetSelectionRect_Right,[2]);
  AddFun('GetSelectionRect_Top',_MethodGetSelectionRect_Top,[2]);
  AddFun('GetSelectionRect_Bottom',_MethodGetSelectionRect_Bottom,[2]);

  AddFun('GetDrawingRect_Left',_MethodGetDrawingRect_Left,[2]);
  AddFun('GetDrawingRect_Right',_MethodGetDrawingRect_Right,[2]);
  AddFun('GetDrawingRect_Top',_MethodGetDrawingRect_Top,[2]);
  AddFun('GetDrawingRect_Bottom',_MethodGetDrawingRect_Bottom,[2]);

  AddFun('GetVisibleRect_Left',_MethodGetVisibleRect_Left,[2]);
  AddFun('GetVisibleRect_Right',_MethodGetVisibleRect_Right,[2]);
  AddFun('GetVisibleRect_Top',_MethodGetVisibleRect_Top,[2]);
  AddFun('GetVisibleRect_Bottom',_MethodGetVisibleRect_Bottom,[2]);

  AddProc('DeConvertXY',_MethodDeConvertXY,[1,1,1]);
  AddProc('DeConvertDim',_MethodDeConvertDim,[1]);
  AddProc('ConvertXY',_MethodConvertXY,[1,1,1]);
  AddProc('ConvertDim',_MethodConvertDim,[1]);
  AddProc('ZoomArea',_MethodZoomArea,[0,0,0,0]);
  AddProc('FitToWindow',_MethodFitToWindow,[2]);
  AddProc('ActualSize',_MethodActualSize,[2]);
  AddProc('ZoomOut',_MethodZoomOut,[2]);
  AddProc('ZoomIn',_MethodZoomIn,[2]);
  AddProc('ClearGuides',_MethodClearGuides,[2]);
  AddProc('SetTool',_MethodSetTool,[0,0,0]);
  AddProc('SetCursor',_MethodSetCursor,[0]);
  AddProc('SetDragCursor',_MethodSetDragCursor,[0]);
  AddFun('CheckGuideLine',_MethodCheckGuideLine,[0,0]);
  AddProc('BeginHRulerDrag',_MethodBeginHRulerDrag,[2]);
  AddProc('BeginVRulerDrag',_MethodBeginVRulerDrag,[2]);
  AddFun('SurfaceWidth',_MethodSurfaceWidth,[2]);
  AddFun('SurfaceHeight',_MethodSurfaceHeight,[2]);
  AddProc('GetPageRect',_MethodGetPageRect,[1,1,1,1]);
  AddProc('SetSurfaceMargin',_MethodSetSurfaceMargin,[0]);
  AddProc('SetScrollPositions',_MethodSetScrollPositions,[0,0]);
  AddProc('SetHScrollPosition',_MethodSetHScrollPosition,[0,0]);
  AddProc('SetVScrollPosition',_MethodSetVScrollPosition,[0,0]);
  AddProc('SetHScrollDelta',_MethodSetHScrollDelta,[0,0]);
  AddProc('SetVScrollDelta',_MethodSetVScrollDelta,[0,0]);
  AddFun('HSCBarPosition',_MethodHSCBarPosition,[2]);
  AddFun('VSCBarPosition',_MethodVSCBarPosition,[2]);
  AddFun('PointInHScroll',_MethodPointInHScroll,[0,0]);
  AddFun('PointInVScroll',_MethodPointInVScroll,[0,0]);
  AddFun('PointInHRuler',_MethodPointInHRuler,[0,0]);
  AddFun('PointInVRuler',_MethodPointInVRuler,[0,0]);
  AddProc('CenterLocation',_MethodCenterLocation,[0,0]);
  AddFun('PointInView',_MethodPointInView,[0,0]);
  AddProc('ZoomDetailPoint',_MethodZoomDetailPoint,[0,0]);
  AddFun('HitTestModPointInt',_MethodHitTestModPointInt,[0,0]);
  AddProc('SimulateTrace',_MethodSimulateTrace,[0,0]);
  AddProc('SimulateDown',_MethodSimulateDown,[0,0]);
  AddProc('SimulateUp',_MethodSimulateUp,[0,0]);
  AddProc('SimulateRightClick',_MethodSimulateRightClick,[0,0]);
  AddProc('SetSelectionHatch',_MethodSetSelectionHatch,[0,0,0,0]);
  AddProc('SetSelectionGradient',_MethodSetSelectionGradient,[0,0,0]);
  AddProc('SetSelectionTexture',_MethodSetSelectionTexture,[0,0]);
  AddFun('NewLayer',_MethodNewLayer,[0]);
  AddFun('DeleteLayer',_MethodDeleteLayer,[0]);
  AddFun('DeleteLayerWithNbr',_MethodDeleteLayerWithNbr,[0]);
  AddProc('DeleteAllUserLayers',_MethodDeleteAllUserLayers,[2]);
  AddProc('UnDo',_MethodUnDo,[2]);
  AddProc('ReDo',_MethodReDo,[2]);
  AddProc('ClearUndoList',_MethodClearUndoList,[2]);
  AddProc('ShowLayer',_MethodShowLayer,[0]);
  AddProc('HideLayer',_MethodHideLayer,[0]);
  AddProc('HideAllLayers',_MethodHideAllLayers,[2]);
  AddProc('GrayLayer',_MethodGrayLayer,[0]);
  AddProc('ExGrayLayer',_MethodExGrayLayer,[0]);
  AddProc('ExHideLayer',_MethodExHideLayer,[0]);
  AddProc('ShowAllLayers',_MethodShowAllLayers,[2]);
  AddProc('MergeAllLayers',_MethodMergeAllLayers,[2]);
  AddProc('MergeVisibleLayers',_MethodMergeVisibleLayers,[2]);
  AddFun('GetLayerName',_MethodGetLayerName,[0]);
  AddFun('GetLayerHandle',_MethodGetLayerHandle,[0]);
  AddFun('GetLayerVisible',_MethodGetLayerVisible,[0]);
  AddFun('GetLayerGrayed',_MethodGetLayerGrayed,[0]);
  AddFun('GetSelectedHandle',_MethodGetSelectedHandle,[0]);
  AddFun('FigureGetHandle',_MethodFigureGetHandle,[0]);
  AddFun('FigureGetName',_MethodFigureGetName,[0]);
  AddFun('FigureGetClass',_MethodFigureGetClass,[0]);
  AddFun('FigureGetPointCount',_MethodFigureGetPointCount,[0]);
  AddFun('FigureGetPoint_X',_MethodFigureGetPoint_X,[0,0]);
  AddFun('FigureGetPoint_Y',_MethodFigureGetPoint_Y,[0,0]);
  AddFun('FigureGetDCPoint_X',_MethodFigureGetDCPoint_X,[0,0]);
  AddFun('FigureGetDCPoint_Y',_MethodFigureGetDCPoint_Y,[0,0]);
  AddFun('FigureGetCenter_X',_MethodFigureGetCenter_X,[0]);
  AddFun('FigureGetCenter_Y',_MethodFigureGetCenter_Y,[0]);
  AddFun('FigureGetRect_Left',_MethodFigureGetRect_Left,[0]);
  AddFun('FigureGetRect_Right',_MethodFigureGetRect_Right,[0]);
  AddFun('FigureGetRect_Top',_MethodFigureGetRect_Top,[0]);
  AddFun('FigureGetRect_Bottom',_MethodFigureGetRect_Bottom,[0]);

  AddFun('FigureGetRadius',_MethodFigureGetRadius,[0]);
  AddFun('FigureGetFontName',_MethodFigureGetFontName,[0]);
  AddFun('FigureGetFontBold',_MethodFigureGetFontBold,[0]);
  AddFun('FigureGetFontItalic',_MethodFigureGetFontItalic,[0]);
  AddFun('FigureGetFontUnderline',_MethodFigureGetFontUnderline,[0]);
  AddFun('FigureGetFontStrike',_MethodFigureGetFontStrike,[0]);
  AddFun('FigureGetFontSize',_MethodFigureGetFontSize,[0]);
  AddFun('FigureGetFontCharset',_MethodFigureGetFontCharset,[0]);
  AddFun('FigureGetFontColor',_MethodFigureGetFontColor,[0]);
  AddFun('FigureGetPenColor',_MethodFigureGetPenColor,[0]);
  AddFun('FigureGetBrushColor',_MethodFigureGetBrushColor,[0]);
  AddFun('FigureGetPenStyle',_MethodFigureGetPenStyle,[0]);
  AddFun('FigureGetBrushStyle',_MethodFigureGetBrushStyle,[0]);
  AddFun('FigureGetRowStyle',_MethodFigureGetRowStyle,[0]);
  AddFun('FigureGetPenWidth',_MethodFigureGetPenWidth,[0]);
  AddFun('FigureGetInfo',_MethodFigureGetInfo,[0]);
  AddFun('FigureGetAngle',_MethodFigureGetAngle,[0]);
  AddFun('FigureGetLayerHandle',_MethodFigureGetLayerHandle,[0]);
  AddFun('FigureGetDiagonal',_MethodFigureGetDiagonal,[0]);
  AddFun('FigureGetLockMove',_MethodFigureGetLockMove,[0]);
  AddFun('FigureGetLockModify',_MethodFigureGetLockModify,[0]);
  AddFun('FigureGetSelected',_MethodFigureGetSelected,[0]);
  AddFun('FigureTestPoint',_MethodFigureTestPoint,[0,0,0]);
  AddFun('FigureTestRect',_MethodFigureTestRect,[0,0,0,0,0]);
  AddFun('FigureGetRgnHandle',_MethodFigureGetRgnHandle,[0]);
  AddProc('FigureSelect',_MethodFigureSelect,[0]);
  AddProc('FigureSelectAsRotate',_MethodFigureSelectAsRotate,[0]);
  AddProc('FigureDeSelect',_MethodFigureDeSelect,[0]);
  AddProc('FigureEdit',_MethodFigureEdit,[0]);
  AddProc('FigureMove',_MethodFigureMove,[0,0,0]);
  AddProc('FigureRotate',_MethodFigureRotate,[0,0]);
  AddProc('FigureRotateByPoint',_MethodFigureRotateByPoint,[0,0,0,0]);
  AddProc('FigureMirror',_MethodFigureMirror,[0,0,0,0,0]);
  AddProc('FigureScale',_MethodFigureScale,[0,0,0]);
  AddProc('FigureScaleByPoint',_MethodFigureScaleByPoint,[0,0,0,0,0]);
  AddProc('FigureSetFontName',_MethodFigureSetFontName,[0,0]);
  AddProc('FigureSetFontBold',_MethodFigureSetFontBold,[0,0]);
  AddProc('FigureSetFontItalic',_MethodFigureSetFontItalic,[0,0]);
  AddProc('FigureSetFontUnderline',_MethodFigureSetFontUnderline,[0,0]);
  AddProc('FigureSetFontStrike',_MethodFigureSetFontStrike,[0,0]);
  AddProc('FigureSetFontSize',_MethodFigureSetFontSize,[0,0]);
  AddProc('FigureSetFontCharset',_MethodFigureSetFontCharset,[0,0]);
  AddProc('FigureSetFontColor',_MethodFigureSetFontColor,[0,0]);
  AddProc('FigureSetPenColor',_MethodFigureSetPenColor,[0,0]);
  AddProc('FigureSetBrushColor',_MethodFigureSetBrushColor,[0,0]);
  AddProc('FigureSetPenStyle',_MethodFigureSetPenStyle,[0,0]);
  AddProc('FigureSetBrushStyle',_MethodFigureSetBrushStyle,[0,0]);
  AddProc('FigureSetRowStyle',_MethodFigureSetRowStyle,[0,0]);
  AddProc('FigureSetPenWidth',_MethodFigureSetPenWidth,[0,0]);
  AddProc('FigureSetPoint',_MethodFigureSetPoint,[0,0,0,0]);
  AddProc('FigureSetInfo',_MethodFigureSetInfo,[0,0]);
  AddProc('FigureSetAngle',_MethodFigureSetAngle,[0,0]);
  AddProc('FigureSetLayerHandle',_MethodFigureSetLayerHandle,[0,0]);
  AddProc('FigureSetDiagonal',_MethodFigureSetDiagonal,[0,0]);
  AddProc('FigureSetLockMove',_MethodFigureSetLockMove,[0,0]);
  AddProc('FigureSetLockModify',_MethodFigureSetLockModify,[0,0]);
  AddProc('FigureSetRgnHandle',_MethodFigureSetRgnHandle,[0,0]);
  AddFun('GetDCPoint_X',_MethodGetDCPoint_X,[0,0]);
  AddFun('GetDCPoint_Y',_MethodGetDCPoint_Y,[0,0]);
  AddFun('GetDCLen',_MethodGetDCLen,[0]);
  AddFun('FigureGrpGetFigureCount',_MethodFigureGrpGetFigureCount,[0]);
  AddFun('FigureGrpGetFigureHandle',_MethodFigureGrpGetFigureHandle,[0,0]);
  AddFun('FigureGrpGetCombined',_MethodFigureGrpGetCombined,[0]);
  AddProc('FigureGrpSetCombined',_MethodFigureGrpSetCombined,[0,0]);
  AddProc('FigureGrpUngroup',_MethodFigureGrpUngroup,[0]);
  AddFun('FigureBlockGetBlockname',_MethodFigureBlockGetBlockname,[0]);
  AddFun('FigureGetJoin1',_MethodFigureGetJoin1,[0]);
  AddFun('FigureGetJoin2',_MethodFigureGetJoin2,[0]);
  AddProc('FigureSetJoin1',_MethodFigureSetJoin1,[0,0]);
  AddProc('FigureSetJoin2',_MethodFigureSetJoin2,[0,0]);
  AddFun('FigureGetClosed',_MethodFigureGetClosed,[0]);
  AddProc('FigureSetClosed',_MethodFigureSetClosed,[0,0]);
  AddFun('FigureGetControlPoint_X',_MethodFigureGetControlPoint_X,[0,0,0]);
  AddFun('FigureGetControlPoint_Y',_MethodFigureGetControlPoint_Y,[0,0,0]);
  AddProc('FigureSetControlPoints',_MethodFigureSetControlPoints,[0,0,0,0,0,0]);
  AddFun('FigureGetSegmentType',_MethodFigureGetSegmentType,[0,0]);
  AddProc('FigureSetSegmentType',_MethodFigureSetSegmentType,[0,0,0]);
  AddProc('FigureInvertArcSegment',_MethodFigureInvertArcSegment,[0,0]);
  AddProc('FigureConvertPLBezier',_MethodFigureConvertPLBezier,[0]);
  AddProc('FigureConvertPLPolyline',_MethodFigureConvertPLPolyline,[0]);
  AddFun('FigureGetElpALen',_MethodFigureGetElpALen,[0]);
  AddFun('FigureGetElpBLen',_MethodFigureGetElpBLen,[0]);
  AddFun('FigureGetArcStyle',_MethodFigureGetArcStyle,[0]);
  AddProc('FigureSetArcStyle',_MethodFigureSetArcStyle,[0,0]);
  AddProc('FigureInvertArc',_MethodFigureInvertArc,[0]);
  AddFun('FigureGetArcSAngle',_MethodFigureGetArcSAngle,[0]);
  AddFun('FigureGetArcFAngle',_MethodFigureGetArcFAngle,[0]);
  AddProc('FigureSetArcAngles',_MethodFigureSetArcAngles,[0,0,0]);
  AddFun('FigureGetRichText',_MethodFigureGetRichText,[0]);
  AddProc('FigureSetRichText',_MethodFigureSetRichText,[0,0]);
  AddFun('FigureGetPictureName',_MethodFigureGetPictureName,[0]);
  AddFun('FigureGetTransparent',_MethodFigureGetTransparent,[0]);
  AddProc('FigureSetTransparent',_MethodFigureSetTransparent,[0,0]);
  AddProc('FigureFlipHorz',_MethodFigureFlipHorz,[0]);
  AddProc('FigureFlipVert',_MethodFigureFlipVert,[0]);
  AddProc('FigureSkewBitmap',_MethodFigureSkewBitmap,[0]);
  AddProc('FigureSaveBitmapToFile',_MethodFigureSaveBitmapToFile,[0,0]);
  AddProc('FigureLoadBitmapFromFile',_MethodFigureLoadBitmapFromFile,[0,0]);
  AddFun('FigureGetText',_MethodFigureGetText,[0]);
  AddProc('FigureSetText',_MethodFigureSetText,[0,0]);
  AddFun('DrawUserFigureEvent',_MethodDrawUserFigureEvent,[0,0,0,0]);
  AddFun('PointInUserFigureEvent',_MethodPointInUserFigureEvent,[0,0,0,0,1]);
  AddProc('Draw',_MethodDraw,[2]);
  AddProc('DrawFigures',_MethodDrawFigures,[2]);
  AddProc('DrawSelectedFigures',_MethodDrawSelectedFigures,[2]);
  AddProc('DrawSelectionPoints',_MethodDrawSelectionPoints,[2]);
  AddProc('DrawFigureGuides',_MethodDrawFigureGuides,[2]);
  AddProc('SelectAll',_MethodSelectAll,[0]);
  AddProc('DeselectAll',_MethodDeselectAll,[0]);
  AddProc('InvertSelection',_MethodInvertSelection,[2]);
  AddFun('GroupSelection',_MethodGroupSelection,[2]);
  AddProc('UngroupSelection',_MethodUngroupSelection,[2]);
  AddProc('OrderSelection',_MethodOrderSelection,[0]);
  AddProc('RemoveSelection',_MethodRemoveSelection,[2]);
  AddProc('RotateSelectionCenter',_MethodRotateSelectionCenter,[0]);
  AddProc('RotateSelection',_MethodRotateSelection,[0,0,0]);
  AddProc('MirrorSelection',_MethodMirrorSelection,[0,0,0,0,0]);
  AddProc('KnifeSelection',_MethodKnifeSelection,[0,0,0,0]);
  AddProc('CreateDimLinesOfSelection',_MethodCreateDimLinesOfSelection,[2]);
  AddProc('ClearDimLinesOfSelection',_MethodClearDimLinesOfSelection,[2]);
  AddProc('InterBreakSelection',_MethodInterBreakSelection,[2]);
  AddProc('LockSelectionToMove',_MethodLockSelectionToMove,[0]);
  AddProc('LockSelectionToModify',_MethodLockSelectionToModify,[0]);
  AddProc('InvertArcsOfSelection',_MethodInvertArcsOfSelection,[2]);
  AddProc('ArrangeArcStyleOfSelection',_MethodArrangeArcStyleOfSelection,[0]);
  AddProc('CloseSelectedPolyline',_MethodCloseSelectedPolyline,[2]);
  AddProc('OpenSelectedPolyline',_MethodOpenSelectedPolyline,[2]);
  AddProc('SimplfySelectedPolyline',_MethodSimplfySelectedPolyline,[2]);
  AddProc('NameSelection',_MethodNameSelection,[2]);
  AddProc('ConvertPLToBezier',_MethodConvertPLToBezier,[2]);
  AddProc('ConvertPLToPolyline',_MethodConvertPLToPolyline,[2]);
  AddProc('FlipImagesOfSelection',_MethodFlipImagesOfSelection,[0]);
  AddProc('setTransparentOfSelection',_MethodsetTransparentOfSelection,[0]);
  AddProc('ScaleSelection',_MethodScaleSelection,[0,0,0,0]);
  AddProc('ScaleDrawing',_MethodScaleDrawing,[0,0]);
  AddProc('ModifyFontName',_MethodModifyFontName,[0]);
  AddProc('ModifyFontBold',_MethodModifyFontBold,[0]);
  AddProc('ModifyFontItalic',_MethodModifyFontItalic,[0]);
  AddProc('ModifyFontUnderline',_MethodModifyFontUnderline,[0]);
  AddProc('ModifyFontStrike',_MethodModifyFontStrike,[0]);
  AddProc('ModifyFontSize',_MethodModifyFontSize,[0]);
  AddProc('ModifyFontCharset',_MethodModifyFontCharset,[0]);
  AddProc('ModifyFontColor',_MethodModifyFontColor,[0]);
  AddProc('ModifyPenColor',_MethodModifyPenColor,[0]);
  AddProc('ModifyBrushColor',_MethodModifyBrushColor,[0]);
  AddProc('ModifyPenStyle',_MethodModifyPenStyle,[0]);
  AddProc('ModifyBrushStyle',_MethodModifyBrushStyle,[0]);
  AddProc('ModifyRowStyle',_MethodModifyRowStyle,[0]);
  AddProc('ModifyPenWidth',_MethodModifyPenWidth,[0]);
  AddFun('IsTextSelected',_MethodIsTextSelected,[2]);
  AddProc('GetSelectionBoundS',_MethodGetSelectionBoundS,[1,1,1,1]);
  AddProc('GetDrawingBounds',_MethodGetDrawingBounds,[1,1,1,1]);
  AddProc('ReDrawSelection',_MethodReDrawSelection,[2]);
  AddProc('ReDrawSelectionPoints',_MethodReDrawSelectionPoints,[2]);
  AddProc('ManualRefresh',_MethodManualRefresh,[2]);
  AddProc('RefreshSelection',_MethodRefreshSelection,[2]);
  AddProc('Reselect',_MethodReselect,[2]);
  AddFun('GetSurfaceBitmapHandle',_MethodGetSurfaceBitmapHandle,[2]);
  AddFun('SelectByPoint',_MethodSelectByPoint,[0,0,0,0]);
  AddFun('DoMagicWand',_MethodDoMagicWand,[0,0,0]);
  AddFun('SelectByFigure',_MethodSelectByFigure,[0,0,0]);
  AddFun('SelectWithInArea',_MethodSelectWithInArea,[0,0,0,0,0,0]);
  AddProc('SelectFigure',_MethodSelectFigure,[0]);
  AddProc('DeSelectFigure',_MethodDeSelectFigure,[0]);
  AddProc('MoveSelection',_MethodMoveSelection,[0,0]);
  AddProc('MoveAll',_MethodMoveAll,[0,0]);
  AddProc('MoveAllSilent',_MethodMoveAllSilent,[0,0]);
  AddProc('DuplicateSelection',_MethodDuplicateSelection,[0,0]);
  AddProc('DuplicateSelectionAsBezier',_MethodDuplicateSelectionAsBezier,[0,0]);
  AddProc('ConvertSelectionToBezier',_MethodConvertSelectionToBezier,[2]);
  AddProc('ArrayRectSelection',_MethodArrayRectSelection,[0,0,0,0]);
  AddProc('ArrayPolarSelection',_MethodArrayPolarSelection,[0,0,0]);
  AddProc('MakeSelectionBlock',_MethodMakeSelectionBlock,[0]);
  AddProc('BoundSelectedLine',_MethodBoundSelectedLine,[2]);
  AddProc('BoundLineToFigures',_MethodBoundLineToFigures,[0,0,0]);
  AddProc('BoundLinePoint',_MethodBoundLinePoint,[0,0,0,0]);
  AddProc('UnBoundLine',_MethodUnBoundLine,[2]);
  AddFun('MakeSelectedLinesPolyline',_MethodMakeSelectedLinesPolyline,[2]);
  AddFun('WeldIntoPolyline',_MethodWeldIntoPolyline,[2]);
  AddProc('OffSetSelection',_MethodOffSetSelection,[0]);
  AddProc('ClipSelBitmapToSelFigure',_MethodClipSelBitmapToSelFigure,[2]);
  AddProc('UnClipSelBitmap',_MethodUnClipSelBitmap,[2]);
  AddProc('SaveToFile',_MethodSaveToFile,[0,0]);
  AddProc('LoadFromFile',_MethodLoadFromFile,[0]);
  AddFun('InsertBlockwithFileName',_MethodInsertBlockwithFileName,[0,0,0,0]);
  AddProc('SetBlockInfo',_MethodSetBlockInfo,[0,0]);
  AddProc('ExportAsWmf',_MethodExportAsWmf,[0]);
  AddProc('ExportAsDxf',_MethodExportAsDxf,[0]);
  AddFun('SelectionAsMetaFile',_MethodSelectionAsMetaFile,[2]);
  AddFun('DrawingAsMetaFile',_MethodDrawingAsMetaFile,[2]);
  AddFun('FigureAsMetaFile',_MethodFigureAsMetaFile,[0]);
  AddFun('SelectionAsBmpHandle',_MethodSelectionAsBmpHandle,[0]);
  AddProc('SaveAsBitmap',_MethodSaveAsBitmap,[0]);
  AddFun('CreatePreviewBitmapHandle',_MethodCreatePreviewBitmapHandle,[2]);
  AddProc('DrawToDC',_MethodDrawToDC,[0,0,0,0]);
  AddProc('StretchToDC',_MethodStretchToDC,[0,0,0,0,0]);
  AddProc('PrintDrawing',_MethodPrintDrawing,[0]);
  AddProc('PrintDrawingAsWmf',_MethodPrintDrawingAsWmf,[0]);
  AddProc('PrnStartJob',_MethodPrnStartJob,[0]);
  AddProc('PrnDoJob',_MethodPrnDoJob,[0]);
  AddProc('PrnEndJob',_MethodPrnEndJob,[2]);
  AddProc('PrnAbortJob',_MethodPrnAbortJob,[2]);
  AddProc('PrintByTiling',_MethodPrintByTiling,[0,0,0]);
  AddProc('ImportDXF',_MethodImportDXF,[0,0,0]);
  AddProc('Clear',_MethodClear,[0]);
  AddProc('CopyToClipBoard',_MethodCopyToClipBoard,[2]);
  AddProc('CutToClipBoard',_MethodCutToClipBoard,[2]);
  AddProc('SetFieldText',_MethodSetFieldText,[0,0]);
  AddProc('PasteFromClipBoard',_MethodPasteFromClipBoard,[0]);
  AddFun('GetLayerNbr',_MethodGetLayerNbr,[0]);
  AddFun('FindFigureByName',_MethodFindFigureByName,[0]);
  AddFun('Line',_MethodLine,[0,0,0,0,0,0,0,0,0,0]);
  AddFun('Vertex',_MethodVertex,[0,0,0,0]);
  AddFun('Ellipse',_MethodEllipse,[0,0,0,0,0,0,0,0,0,0,0,0]);
  AddFun('DrawCircle',_MethodDrawCircle,[0,0,0,0,0,0,0,0,0,0]);
  AddFun('Arc',_MethodArc,[0,0,0,0,0,0,0,0,0,0,0,0,0]);
  AddFun('ElpArc',_MethodElpArc,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);
  AddFun('Rectangle',_MethodRectangle,[0,0,0,0,0,0,0,0,0,0,0]);
  AddFun('InsertBitmap',_MethodInsertBitmap,[0,0,0,0,0,0]);
  AddFun('InsertBitmapHandle',_MethodInsertBitmapHandle,[0,0,0,0,0,0]);
  AddFun('InsertWMF',_MethodInsertWMF,[0,0,0,0,0]);
  AddFun('ImportWMF',_MethodImportWMF,[0,0,0]);
  AddFun('ImportDrawing',_MethodImportDrawing,[0,0,0,0,0]);
  AddFun('TextOut',_MethodTextOut,[0,0,0,0,0,0,0,0,0,0,0]);
  AddFun('GetFigureCustomStream',_MethodGetFigureCustomStream,[0,1]);
  AddProc('SetFigureCustomStream',_MethodSetFigureCustomStream,[0,0,1]);
  AddFun('GetCustomStream',_MethodGetCustomStream,[1]);
  AddProc('SetCustomStream',_MethodSetCustomStream,[0,1]);
  AddProc('PrintPreview',_MethodPrintPreview,[2]);
  AddFun('GetSlcPenStyle',_MethodGetSlcPenStyle,[2]);
  AddFun('GetSlcPenWidth',_MethodGetSlcPenWidth,[2]);
  AddFun('GetSlcPenColor',_MethodGetSlcPenColor,[2]);
  AddFun('GetSlcRowStyle',_MethodGetSlcRowStyle,[2]);
  AddFun('GetSlcBrushStyle',_MethodGetSlcBrushStyle,[2]);
  AddFun('GetSlcBrushColor',_MethodGetSlcBrushColor,[2]);
  AddFun('GetSlcFontName',_MethodGetSlcFontName,[2]);
  AddFun('GetSlcFontBold',_MethodGetSlcFontBold,[2]);
  AddFun('GetSlcFontItalic',_MethodGetSlcFontItalic,[2]);
  AddFun('GetSlcFontStrike',_MethodGetSlcFontStrike,[2]);
  AddFun('GetSlcFontSize',_MethodGetSlcFontSize,[2]);
  AddFun('GetSlcFontColor',_MethodGetSlcFontColor,[2]);
  AddFun('GetSlcPolylineClosed',_MethodGetSlcPolylineClosed,[2]);
  AddFun('GetSlcImageTransparent',_MethodGetSlcImageTransparent,[2]);
  AddFun('GetSlcImageClipped',_MethodGetSlcImageClipped,[2]);
  AddFun('GetSlcArcStyle',_MethodGetSlcArcStyle,[2]);
  AddFun('GetSlcLineBounded',_MethodGetSlcLineBounded,[2]);
  AddFun('CountBlock',_MethodCountBlock,[0]);
  AddProc('ExecuteTBCommand',_MethodExecuteTBCommand,[0]);
  AddFun('GetVersion',_MethodGetVersion,[2]);
  AddFun('GetBuildNumber',_MethodGetBuildNumber,[2]);
  AddFun('BlockAsMetafile',_MethodBlockAsMetafile,[0]);
  AddProc('LockSelChange',_MethodLockSelChange,[2]);
  AddProc('UnLockSelChange',_MethodUnLockSelChange,[2]);
  AddProc('CenterPage',_MethodCenterPage,[2]);
  AddProc('AlignPageDown',_MethodAlignPageDown,[2]);
  AddProc('AlignPageUp',_MethodAlignPageUp,[2]);
  AddProc('StartBlink',_MethodStartBlink,[2]);
  AddProc('StopBlink',_MethodStopBlink,[2]);
  AddProc('ResumeBlink',_MethodResumeBlink,[2]);
  AddFun('IsBlinking',_MethodIsBlinking,[2]);
  AddProc('CalibrateLayerScale',_MethodCalibrateLayerScale,[0,0,0,0,0]);
  AddFun('cNewDrawing',_MethodcNewDrawing,[2]);
  AddProc('cOpenDrawing',_MethodcOpenDrawing,[2]);
  AddProc('cOpenDrawingFile',_MethodcOpenDrawingFile,[0]);
  AddProc('cSaveDrawing',_MethodcSaveDrawing,[2]);
  AddProc('cSaveAsDrawing',_MethodcSaveAsDrawing,[2]);
  AddProc('cPrintDrawing',_MethodcPrintDrawing,[2]);
  AddProc('cPrintDrawingAsWmf',_MethodcPrintDrawingAsWmf,[2]);
  AddProc('cTestPrinter',_MethodcTestPrinter,[2]);
  AddProc('cExportAs',_MethodcExportAs,[2]);
  AddProc('cImportDxf',_MethodcImportDxf,[2]);
  AddProc('DoPopUp',_MethodDoPopUp,[0,0]);
  AddProc('ExecuteCustomCommand',_MethodExecuteCustomCommand,[0]);
  AddProc('ExecuteVerbalCommand',_MethodExecuteVerbalCommand,[0]);
  AddFun('ExitApplication',_MethodExitApplication,[2]);
  AddFun('IsUnNamed',_MethodIsUnNamed,[2]);
  

end;

initialization
  try
  InitPowerCad;
  except end;
end.
