unit PCPlgInt;

interface

Uses Classes,Graphics,Windows,SysUtils,Menus,Controls;

Procedure SetControlForPlugins(Value: Pointer);

//variables
var

cbZoomIn:Procedure(Sender:Integer);stdcall;
cbZoomOut:Procedure(Sender:Integer);stdcall;
cbZoomArea:Procedure(Sender:Integer);stdcall;
cbZoomActualSize:Procedure(Sender:Integer);stdcall;
cbZoomFitToWindow:Procedure(Sender:Integer);stdcall;
cbSurfaceMove:Procedure(Sender:Integer;Shift:Integer;X:Double;Y:Double);stdcall;
cbSurfaceMouseDown:Procedure(Sender:Integer;Button:Integer;Shift:Integer;X:Double;Y:Double);stdcall;
cbSurfaceMouseUp:Procedure(Sender:Integer;Button:Integer;Shift:Integer;X:Double;Y:Double);stdcall;
cbSurfaceLeave:Procedure(Sender:Integer);stdcall;
cbSurfaceClick:Procedure(Sender:Integer);stdcall;
cbSurfaceDblClick:Procedure(Sender:Integer);stdcall;
cbSurfaceDragDrop:Procedure(Sender:Integer;Source:Integer;X:Double;Y:Double);stdcall;
cbSurfaceDragOver:Procedure(Sender:Integer;Source:Integer;X:Double;Y:Double;State:Integer;var Accept:LongInt);stdcall;
cbScaleChanged:Procedure(Sender:Integer);stdcall;
cbScrollValues:Procedure(Sender:Integer;ScHorzMAx:Integer;scVertMax:Integer;scHorzPos:Integer;scVertPos:Integer;scHorzPage:Integer;scVertPage:Integer;sChange:Integer;lChange:Integer);stdcall;
cbCursorChange:Procedure(Sender:Integer;Cursor:Integer);stdcall;
cbBeforePaint:Procedure(Sender:Integer);stdcall;
cbCustomGuideTraceVB:Procedure(Sender:Integer;x:Integer;y:Integer;dx:Double;dy:Double;Dc:Integer);stdcall;
cbSelectionChange:Procedure(Sender:Integer);stdcall;
cbObjectInserted:Procedure(Sender:Integer;Reason:Integer);stdcall;
cbBeforeFigureInsert:Procedure(Sender:Integer;Figure:Integer;var InsertState:Integer);stdcall;
cbFigureMoved:Procedure(Sender:Integer;Figure:Integer;dx:Double;dy:Double);stdcall;
cbFigureModify:Procedure(Sender:Integer;Figure:Integer);stdcall;
cbFigureSelect:Procedure(Sender:Integer;Figure:Integer);stdcall;
cbBeforeDelete:Procedure(Sender:Integer;Figure:Integer;var CanDelete:LongInt);stdcall;
cbAfterDelete:Procedure(Sender:Integer);stdcall;
cbBeforeUndo:Procedure(Sender:Integer);stdcall;
cbAfterUndo:Procedure(Sender:Integer);stdcall;
cbSurfacePaint:Procedure(Sender:Integer);stdcall;
cbMapScaleChanged:Procedure(Sender:Integer);stdcall;
cbUserDraw:Procedure(Sender:Integer;CName:PChar;DC:Integer;Figure:Integer;isGrayed:LongInt;var drawed:LongInt);stdcall;
cbUserHitTest:Procedure(Sender:Integer;CName:PChar;Figure:Integer;x:Double;y:Double;var Test:LongInt;var Tested:LongInt);stdcall;
cbBeforeClear:Procedure(Sender:Integer);stdcall;
cbObjectSaved:Procedure(Sender:Integer;Figure:Integer);stdcall;
cbFigureEdit:Procedure(Sender:Integer;Figure:Integer);stdcall;
cbCustomUndo:Procedure(Sender:Integer;isRedo:LongInt);stdcall;
cbBeforeModify:Procedure(Sender:Integer;Figure:Integer);stdcall;
cbBeforeMove:Procedure(Sender:Integer;Figure:Integer);stdcall;
cbBeforeMoveAll:Procedure(Sender:Integer;var dx:Double;var dy:Double);stdcall;
cbAfterMoveAll:Procedure(Sender:Integer;dx:Double;dy:Double);stdcall;
cbCalibrateLayer:Procedure(Sender:Integer;LayerNbr:Integer;dist:Double;cUnit:Byte);stdcall;
cbCustomStreamUpdate:Procedure(Sender:Integer);stdcall;
cbCustomStreamLoaded:Procedure(Sender:Integer);stdcall;
cbDrawFigureInfo:Procedure(Sender:Integer;Figure:Integer;var Info:PChar);stdcall;
cbCustomCommand:Procedure(Sender:Integer;ComName:PChar);stdcall;
cbPopMenuClicked:Procedure(Sender:Integer;MenuIndex:Integer);stdcall;
cbFigurePopMenuClicked:Procedure(Sender:Integer;Figure:Integer;MenuIndex:Integer);stdcall;
cbFileNameChange:Procedure(Sender:Integer);stdcall;
cbStatusMessages:Procedure(Sender:Integer;Status1:PChar;Status2:PChar;Status3:PChar;Status4:PChar);stdcall;
cbGUIEvent:Procedure(Sender:Integer;EventId:Integer;Numval:Integer;StrVal:PChar;DblVal:Double;CEnable:LongInt);stdcall;
cbRefresh:Procedure(Sender:Integer);stdcall;
cbTraceDraw:Procedure(Sender:Integer;Figure:Integer);stdcall;
cbToolChanged:Procedure(Sender:Integer);stdcall;
cbMoveByArrows:Procedure(Sender:Integer;dx:Double;dy:Double;var CanMove:LongInt);stdcall;
cbKeyStrokeVB:Procedure(Sender:Integer;Key:Integer;Shift:Integer;var CanHandle:LongInt);stdcall;
cbDropFiles:Procedure(Sender:Integer;FileList:PChar;DropX:Double;DropY:Double);stdcall;

implementation

uses PowerCad,PCDrawing,PCTypesUtils,DrawObjects;

Var CadControl: TPowerCad;

Procedure SetControlForPlugins(Value: Pointer);
begin
  CadControl := TPowerCad(Value);
end;

procedure pcSetControlForPlugins(CHandle:Integer);stdcall;
begin
  CadControl := TPowerCad(CHandle);
end;

Function pcGetPropDotsPerMil:Double;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.DotsPerMil;
  except end;
End;

Function pcGetPropLocked:LongInt;stdcall;
Var res:Boolean;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.Locked;
      result := LongInt(res);
    end;
  except end;
End;

Procedure pcSetPropLocked(Value:LongInt);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.Locked := Boolean(Value);
  except end;
End;

Function pcGetPropUpdated:LongInt;stdcall;
Var res:Boolean;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.Updated;
      result := LongInt(res);
    end;
  except end;
End;

Procedure pcSetPropUpdated(Value:LongInt);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.Updated := Boolean(Value);
  except end;
End;

Function pcGetPropAutoRefresh:LongInt;stdcall;
Var res:Boolean;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.AutoRefresh;
      result := LongInt(res);
    end;
  except end;
End;

Procedure pcSetPropAutoRefresh(Value:LongInt);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.AutoRefresh := Boolean(Value);
  except end;
End;

Function pcGetPropRulerVisible:LongInt;stdcall;
Var res:Boolean;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.RulerVisible;
      result := LongInt(res);
    end;
  except end;
End;

Procedure pcSetPropRulerVisible(Value:LongInt);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.RulerVisible := Boolean(Value);
  except end;
End;

Function pcGetPropVerticalZero:Integer;stdcall;
Var res:TVertZero;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.VerticalZero;
      result := Integer(res);
    end;
  except end;
End;

Procedure pcSetPropVerticalZero(Value:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.VerticalZero := TVertZero(Value);
  except end;
End;

Function pcGetPropHorizontalZero:Integer;stdcall;
Var res:THorzZero;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.HorizontalZero;
      result := Integer(res);
    end;
  except end;
End;

Procedure pcSetPropHorizontalZero(Value:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.HorizontalZero := THorzZero(Value);
  except end;
End;

Function pcGetPropToolIdx:Integer;stdcall;
Var res:TPCTool;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.ToolIdx;
      result := Integer(res);
    end;
  except end;
End;

Function pcGetPropToolInfo:PChar;stdcall;
Var res:string;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.ToolInfo;
      result := PChar(res);
    end;
  except end;
End;

Function pcGetPropToolData:Integer;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.ToolData;
  except end;
End;

Function pcGetPropDotsPerMilOrig:Double;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.DotsPerMilOrig;
  except end;
End;

Procedure pcSetPropDotsPerMilOrig(Value:Double);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.DotsPerMilOrig := Value;
  except end;
End;

Function pcGetPropActiveLayer:Integer;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.ActiveLayer;
  except end;
End;

Procedure pcSetPropActiveLayer(Value:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.ActiveLayer := Value;
  except end;
End;

Function pcGetPropZoomScale:Integer;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.ZoomScale;
  except end;
End;

Procedure pcSetPropZoomScale(Value:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.ZoomScale := Value;
  except end;
End;

Function pcGetPropGuidesVisible:LongInt;stdcall;
Var res:Boolean;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.GuidesVisible;
      result := LongInt(res);
    end;
  except end;
End;

Procedure pcSetPropGuidesVisible(Value:LongInt);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.GuidesVisible := Boolean(Value);
  except end;
End;

Function pcGetPropBackGround:Integer;stdcall;
Var res:Tcolor;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.BackGround;
      result := Integer(res);
    end;
  except end;
End;

Procedure pcSetPropBackGround(Value:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.BackGround := Tcolor(Value);
  except end;
End;

Function pcGetPropPageColor:Integer;stdcall;
Var res:TColor;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.PageColor;
      result := Integer(res);
    end;
  except end;
End;

Procedure pcSetPropPageColor(Value:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.PageColor := TColor(Value);
  except end;
End;

Function pcGetPropGrids:LongInt;stdcall;
Var res:Boolean;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.Grids;
      result := LongInt(res);
    end;
  except end;
End;

Procedure pcSetPropGrids(Value:LongInt);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.Grids := Boolean(Value);
  except end;
End;

Function pcGetPropGridType:Integer;stdcall;
Var res:TGridType;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.GridType;
      result := Integer(res);
    end;
  except end;
End;

Procedure pcSetPropGridType(Value:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.GridType := TGridType(Value);
  except end;
End;

Function pcGetPropCenterGuide:LongInt;stdcall;
Var res:Boolean;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.CenterGuide;
      result := LongInt(res);
    end;
  except end;
End;

Procedure pcSetPropCenterGuide(Value:LongInt);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.CenterGuide := Boolean(Value);
  except end;
End;

Function pcGetPropPageGuide:LongInt;stdcall;
Var res:Boolean;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.PageGuide;
      result := LongInt(res);
    end;
  except end;
End;

Procedure pcSetPropPageGuide(Value:LongInt);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.PageGuide := Boolean(Value);
  except end;
End;

Function pcGetPropDrawShadow:LongInt;stdcall;
Var res:Boolean;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.DrawShadow;
      result := LongInt(res);
    end;
  except end;
End;

Procedure pcSetPropDrawShadow(Value:LongInt);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.DrawShadow := Boolean(Value);
  except end;
End;

Function pcGetPropDrawPageBorder:LongInt;stdcall;
Var res:Boolean;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.DrawPageBorder;
      result := LongInt(res);
    end;
  except end;
End;

Procedure pcSetPropDrawPageBorder(Value:LongInt);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.DrawPageBorder := Boolean(Value);
  except end;
End;

Function pcGetPropGridColor:Integer;stdcall;
Var res:TColor;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.GridColor;
      result := Integer(res);
    end;
  except end;
End;

Procedure pcSetPropGridColor(Value:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.GridColor := TColor(Value);
  except end;
End;

Function pcGetPropGuideColor:Integer;stdcall;
Var res:TColor;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.GuideColor;
      result := Integer(res);
    end;
  except end;
End;

Procedure pcSetPropGuideColor(Value:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.GuideColor := TColor(Value);
  except end;
End;

Function pcGetPropRulerColor:Integer;stdcall;
Var res:TColor;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.RulerColor;
      result := Integer(res);
    end;
  except end;
End;

Procedure pcSetPropRulerColor(Value:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.RulerColor := TColor(Value);
  except end;
End;

Function pcGetPropGridStep:Double;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.GridStep;
  except end;
End;

Procedure pcSetPropGridStep(Value:Double);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.GridStep := Value;
  except end;
End;

Function pcGetPropWorkHeight:Double;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.WorkHeight;
  except end;
End;

Procedure pcSetPropWorkHeight(Value:Double);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.WorkHeight := Value;
  except end;
End;

Function pcGetPropWorkWidth:Double;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.WorkWidth;
  except end;
End;

Procedure pcSetPropWorkWidth(Value:Double);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.WorkWidth := Value;
  except end;
End;

Function pcGetPropPageLayout:Integer;stdcall;
Var res:TPageLayOut;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.PageLayout;
      result := Integer(res);
    end;
  except end;
End;

Procedure pcSetPropPageLayout(Value:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.PageLayout := TPageLayOut(Value);
  except end;
End;

Function pcGetPropPageOrient:Integer;stdcall;
Var res:TPageOrient;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.PageOrient;
      result := Integer(res);
    end;
  except end;
End;

Procedure pcSetPropPageOrient(Value:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.PageOrient := TPageOrient(Value);
  except end;
End;

Function pcGetPropGuideTrace:Integer;stdcall;
Var res:TGuideTraces;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.GuideTrace;
      result := Integer(res);
    end;
  except end;
End;

Procedure pcSetPropGuideTrace(Value:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.GuideTrace := TGuideTraces(Value);
  except end;
End;

Function pcGetPropSnapToGuides:LongInt;stdcall;
Var res:Boolean;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.SnapToGuides;
      result := LongInt(res);
    end;
  except end;
End;

Procedure pcSetPropSnapToGuides(Value:LongInt);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.SnapToGuides := Boolean(Value);
  except end;
End;

Function pcGetPropSnapToNearPoint:LongInt;stdcall;
Var res:Boolean;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.SnapToNearPoint;
      result := LongInt(res);
    end;
  except end;
End;

Procedure pcSetPropSnapToNearPoint(Value:LongInt);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.SnapToNearPoint := Boolean(Value);
  except end;
End;

Function pcGetPropSnapToGrids:LongInt;stdcall;
Var res:Boolean;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.SnapToGrids;
      result := LongInt(res);
    end;
  except end;
End;

Procedure pcSetPropSnapToGrids(Value:LongInt);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.SnapToGrids := Boolean(Value);
  except end;
End;

Function pcGetPropScrollBars:LongInt;stdcall;
Var res:Boolean;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.ScrollBars;
      result := LongInt(res);
    end;
  except end;
End;

Procedure pcSetPropScrollBars(Value:LongInt);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.ScrollBars := Boolean(Value);
  except end;
End;

Function pcGetPropRulerSystem:Integer;stdcall;
Var res:TRulerSystem;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.RulerSystem;
      result := Integer(res);
    end;
  except end;
End;

Procedure pcSetPropRulerSystem(Value:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.RulerSystem := TRulerSystem(Value);
  except end;
End;

Function pcGetPropDrawInCursor:LongInt;stdcall;
Var res:Boolean;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.DrawInCursor;
      result := LongInt(res);
    end;
  except end;
End;

Procedure pcSetPropDrawInCursor(Value:LongInt);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.DrawInCursor := Boolean(Value);
  except end;
End;

Function pcGetPropRealScale:LongInt;stdcall;
Var res:Boolean;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.RealScale;
      result := LongInt(res);
    end;
  except end;
End;

Procedure pcSetPropRealScale(Value:LongInt);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.RealScale := Boolean(Value);
  except end;
End;

Function pcGetPropMetricMode:Integer;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.MetricMode;
  except end;
End;

Procedure pcSetPropMetricMode(Value:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.MetricMode := Value;
  except end;
End;

Function pcGetPropAngularMode:Integer;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.AngularMode;
  except end;
End;

Procedure pcSetPropAngularMode(Value:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.AngularMode := Value;
  except end;
End;

Function pcGetPropWmfPrinting:LongInt;stdcall;
Var res:Boolean;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.WmfPrinting;
      result := LongInt(res);
    end;
  except end;
End;

Procedure pcSetPropWmfPrinting(Value:LongInt);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.WmfPrinting := Boolean(Value);
  except end;
End;

Function pcGetPropDefaultPenColor:Integer;stdcall;
Var res:TColor;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.DefaultPenColor;
      result := Integer(res);
    end;
  except end;
End;

Procedure pcSetPropDefaultPenColor(Value:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.DefaultPenColor := TColor(Value);
  except end;
End;

Function pcGetPropDefaultBrushColor:Integer;stdcall;
Var res:TColor;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.DefaultBrushColor;
      result := Integer(res);
    end;
  except end;
End;

Procedure pcSetPropDefaultBrushColor(Value:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.DefaultBrushColor := TColor(Value);
  except end;
End;

Function pcGetPropDefaultPenWidth:Integer;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.DefaultPenWidth;
  except end;
End;

Procedure pcSetPropDefaultPenWidth(Value:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.DefaultPenWidth := Value;
  except end;
End;

Function pcGetPropDefaultPenStyle:Integer;stdcall;
Var res:TPenStyle;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.DefaultPenStyle;
      result := Integer(res);
    end;
  except end;
End;

Procedure pcSetPropDefaultPenStyle(Value:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.DefaultPenStyle := TPenStyle(Value);
  except end;
End;

Function pcGetPropDefaultBrushStyle:Integer;stdcall;
Var res:TBrushStyle;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.DefaultBrushStyle;
      result := Integer(res);
    end;
  except end;
End;

Procedure pcSetPropDefaultBrushStyle(Value:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.DefaultBrushStyle := TBrushStyle(Value);
  except end;
End;

Function pcGetPropDefaultRowStyle:Integer;stdcall;
Var res:TRowStyle;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.DefaultRowStyle;
      result := Integer(res);
    end;
  except end;
End;

Procedure pcSetPropDefaultRowStyle(Value:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.DefaultRowStyle := TRowStyle(Value);
  except end;
End;

Function pcGetPropDefaultTextHeight:Double;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.DefaultTextHeight;
  except end;
End;

Procedure pcSetPropDefaultTextHeight(Value:Double);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.DefaultTextHeight := Value;
  except end;
End;

Function pcGetPropDefaultTextRatio:Double;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.DefaultTextRatio;
  except end;
End;

Procedure pcSetPropDefaultTextRatio(Value:Double);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.DefaultTextRatio := Value;
  except end;
End;

Function pcGetPropDefaultPLineClosed:LongInt;stdcall;
Var res:Boolean;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.DefaultPLineClosed;
      result := LongInt(res);
    end;
  except end;
End;

Procedure pcSetPropDefaultPLineClosed(Value:LongInt);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.DefaultPLineClosed := Boolean(Value);
  except end;
End;

Function pcGetPropDefaultArcStyle:Integer;stdcall;
Var res:TArcStyle;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.DefaultArcStyle;
      result := Integer(res);
    end;
  except end;
End;

Procedure pcSetPropDefaultArcStyle(Value:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.DefaultArcStyle := TArcStyle(Value);
  except end;
End;

Function pcGetPropLayerCount:Integer;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.LayerCount;
  except end;
End;

Function pcGetPropFigureCount:Integer;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.FigureCount;
  except end;
End;

Function pcGetPropSelectedCount:Integer;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.SelectedCount;
  except end;
End;

Function pcGetPropMapScale: Double; stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.MapScale;
  except
  end;
End;

Procedure pcSetPropMapScale(Value:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.MapScale := Value;
  except end;
End;

Function pcGetPropRescaleToMap:Integer;stdcall;
Var res:TMapRescale;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.RescaleToMap;
      result := Integer(res);
    end;
  except end;
End;

Procedure pcSetPropRescaleToMap(Value:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.RescaleToMap := TMapRescale(Value);
  except end;
End;

Function pcGetPropAutoSelect:LongInt;stdcall;
Var res:Boolean;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.AutoSelect;
      result := LongInt(res);
    end;
  except end;
End;

Procedure pcSetPropAutoSelect(Value:LongInt);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.AutoSelect := Boolean(Value);
  except end;
End;

Function pcGetPropKeyCommands:LongInt;stdcall;
Var res:Boolean;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.KeyCommands;
      result := LongInt(res);
    end;
  except end;
End;

Procedure pcSetPropKeyCommands(Value:LongInt);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.KeyCommands := Boolean(Value);
  except end;
End;

Function pcGetPropRecordUndo:LongInt;stdcall;
Var res:Boolean;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.RecordUndo;
      result := LongInt(res);
    end;
  except end;
End;

Procedure pcSetPropRecordUndo(Value:LongInt);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.RecordUndo := Boolean(Value);
  except end;
End;

Function pcGetPropUndoCount:Integer;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.UndoCount;
  except end;
End;

Procedure pcSetPropUndoCount(Value:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.UndoCount := Value;
  except end;
End;

Function pcGetPropDefaultPictureFolder:PChar;stdcall;
Var res:String;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.DefaultPictureFolder;
      result := PChar(res);
    end;
  except end;
End;

Procedure pcSetPropDefaultPictureFolder(Value:PChar);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.DefaultPictureFolder := String(Value);
  except end;
End;

Function pcGetPropSaveWithPreview:LongInt;stdcall;
Var res:Boolean;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.SaveWithPreview;
      result := LongInt(res);
    end;
  except end;
End;

Procedure pcSetPropSaveWithPreview(Value:LongInt);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.SaveWithPreview := Boolean(Value);
  except end;
End;

Function pcGetPropRulerMode:Integer;stdcall;
Var res:TRulerMode;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.RulerMode;
      result := Integer(res);
    end;
  except end;
End;

Procedure pcSetPropRulerMode(Value:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.RulerMode := TRulerMode(Value);
  except end;
End;

Function pcGetPropZoomRect:LongInt;stdcall;
Var res:Boolean;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.ZoomRect;
      result := LongInt(res);
    end;
  except end;
End;

Procedure pcSetPropZoomRect(Value:LongInt);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.ZoomRect := Boolean(Value);
  except end;
End;

Function pcGetPropRangeCheck:LongInt;stdcall;
Var res:Boolean;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.RangeCheck;
      result := LongInt(res);
    end;
  except end;
End;

Procedure pcSetPropRangeCheck(Value:LongInt);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.RangeCheck := Boolean(Value);
  except end;
End;

Function pcGetPropAutoTilePrint:LongInt;stdcall;
Var res:Boolean;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.AutoTilePrint;
      result := LongInt(res);
    end;
  except end;
End;

Procedure pcSetPropAutoTilePrint(Value:LongInt);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.AutoTilePrint := Boolean(Value);
  except end;
End;

Function pcGetPropFigureGuides:LongInt;stdcall;
Var res:Boolean;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.FigureGuides;
      result := LongInt(res);
    end;
  except end;
End;

Procedure pcSetPropFigureGuides(Value:LongInt);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.FigureGuides := Boolean(Value);
  except end;
End;

Function pcGetPropNativeFill:LongInt;stdcall;
Var res:Boolean;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.NativeFill;
      result := LongInt(res);
    end;
  except end;
End;

Procedure pcSetPropNativeFill(Value:LongInt);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.NativeFill := Boolean(Value);
  except end;
End;

Function pcGetPropActiveFile:PChar;stdcall;
Var res:String;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.ActiveFile;
      result := PChar(res);
    end;
  except end;
End;

Procedure pcSetPropActiveFile(Value:PChar);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.ActiveFile := String(Value);
  except end;
End;

Function pcGetPropCurrentColor:Integer;stdcall;
Var res:TColor;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.CurrentColor;
      result := Integer(res);
    end;
  except end;
End;

Procedure pcSetPropCurrentColor(Value:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.CurrentColor := TColor(Value);
  except end;
End;

Function pcGetPropCurrentStyle:Byte;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.CurrentStyle;
  except end;
End;

Procedure pcSetPropCurrentStyle(Value:Byte);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.CurrentStyle := Value;
  except end;
End;

Function pcGetPropCurrentString:PChar;stdcall;
Var res:String;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.CurrentString;
      result := PChar(res);
    end;
  except end;
End;

Procedure pcSetPropCurrentString(Value:PChar);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.CurrentString := String(Value);
  except end;
End;

Function pcGetPropCurrentFlag:LongInt;stdcall;
Var res:Boolean;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.CurrentFlag;
      result := LongInt(res);
    end;
  except end;
End;

Procedure pcSetPropCurrentFlag(Value:LongInt);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.CurrentFlag := Boolean(Value);
  except end;
End;

Function pcGetPropCurrentFileName:PChar;stdcall;
Var res:String;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.CurrentFileName;
      result := PChar(res);
    end;
  except end;
End;

Procedure pcSetPropCurrentFileName(Value:PChar);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.CurrentFileName := String(Value);
  except end;
End;

Function pcGetPropCurrentValue:Double;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.CurrentValue;
  except end;
End;

Procedure pcSetPropCurrentValue(Value:Double);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.CurrentValue := Value;
  except end;
End;

Function pcGetPropFileExtension:PChar;stdcall;
Var res:String;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.FileExtension;
      result := PChar(res);
    end;
  except end;
End;

Procedure pcSetPropFileExtension(Value:PChar);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.FileExtension := String(Value);
  except end;
End;

Function pcGetPropMultiSelect:LongInt;stdcall;
Var res:Boolean;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.MultiSelect;
      result := LongInt(res);
    end;
  except end;
End;

Procedure pcSetPropMultiSelect(Value:LongInt);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.MultiSelect := Boolean(Value);
  except end;
End;

Function pcGetPropOpenDialogTitle:PChar;stdcall;
Var res:String;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.OpenDialogTitle;
      result := PChar(res);
    end;
  except end;
End;

Procedure pcSetPropOpenDialogTitle(Value:PChar);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.OpenDialogTitle := String(Value);
  except end;
End;

Function pcGetPropOpenDialogFilter:PChar;stdcall;
Var res:String;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.OpenDialogFilter;
      result := PChar(res);
    end;
  except end;
End;

Procedure pcSetPropOpenDialogFilter(Value:PChar);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.OpenDialogFilter := String(Value);
  except end;
End;

Function pcGetPropSaveDialogTitle:PChar;stdcall;
Var res:String;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.SaveDialogTitle;
      result := PChar(res);
    end;
  except end;
End;

Procedure pcSetPropSaveDialogTitle(Value:PChar);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.SaveDialogTitle := String(Value);
  except end;
End;

Function pcGetPropSaveDialogFilter:PChar;stdcall;
Var res:String;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.SaveDialogFilter;
      result := PChar(res);
    end;
  except end;
End;

Procedure pcSetPropSaveDialogFilter(Value:PChar);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.SaveDialogFilter := String(Value);
  except end;
End;

Function pcGetPropAcceptFiles:Integer;stdcall;
Var res:TFileDropStyle;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.AcceptFiles;
      result := Integer(res);
    end;
  except end;
End;

Procedure pcSetPropAcceptFiles(Value:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.AcceptFiles := TFileDropStyle(Value);
  except end;
End;

Function pcGetPropMouseCommands:LongInt;stdcall;
Var res:Boolean;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.MouseCommands;
      result := LongInt(res);
    end;
  except end;
End;

Procedure pcSetPropMouseCommands(Value:LongInt);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.MouseCommands := Boolean(Value);
  except end;
End;

Function pcGetPropPopStyle:Integer;stdcall;
Var res:TPopStyle;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.PopStyle;
      result := Integer(res);
    end;
  except end;
End;

Procedure pcSetPropPopStyle(Value:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.PopStyle := TPopStyle(Value);
  except end;
End;

Function pcGetPropCustomPopItems:PChar;stdcall;
Var res:String;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.CustomPopItems;
      result := PChar(res);
    end;
  except end;
End;

Procedure pcSetPropCustomPopItems(Value:PChar);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.CustomPopItems := String(Value);
  except end;
End;

Function pcGetPropMirrorStraight:LongInt;stdcall;
Var res:Boolean;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.MirrorStraight;
      result := LongInt(res);
    end;
  except end;
End;

Procedure pcSetPropMirrorStraight(Value:LongInt);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.MirrorStraight := Boolean(Value);
  except end;
End;

Function pcGetPropDrawingPop:LongInt;stdcall;
Var res:Boolean;
Begin
  try
    if assigned(CadControl) then begin
      res := CadControl.DrawingPop;
      result := LongInt(res);
    end;
  except end;
End;

Procedure pcSetPropDrawingPop(Value:LongInt);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.DrawingPop := Boolean(Value);
  except end;
End;

Procedure pcPrintMessage(Mes:PChar);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.PrintMessage(String(Mes));
  except end;
End;

Procedure pcRefresh;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.Refresh;
  except end;
End;

Function pcClientToScreen(var Point:TPoint):TPoint;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.ClientToScreen(Point);
  except end;
End;

Function pcScreenToClient(var Point:TPoint):TPoint;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.ScreenToClient(Point);
  except end;
End;

Procedure pcSetCustomSurface(CWindow:Integer;CDC:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.SetCustomSurface(HWnD(CWindow),HDC(CDC));
  except end;
End;

Procedure pcDoResize;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.DoResize;
  except end;
End;

Procedure pcSaveScroll;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.SaveScroll;
  except end;
End;

Procedure pcRestoreScroll;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.RestoreScroll;
  except end;
End;

Procedure pcReLocate;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.ReLocate;
  except end;
End;

Procedure pcDoSurfaceMove(Shift:Integer;X:Integer;Y:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.DoSurfaceMove(Shift,X,Y);
  except end;
End;

Procedure pcDoSurfaceClick;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.DoSurfaceClick;
  except end;
End;

Procedure pcDoSurfaceDblClick;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.DoSurfaceDblClick;
  except end;
End;

Procedure pcDoSurfaceLeave;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.DoSurfaceLeave;
  except end;
End;

Procedure pcDoSurfaceDragDrop(Source:Integer;X:Integer;Y:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.DoSurfaceDragDrop(Source,X,Y);
  except end;
End;

Procedure pcDoSurfacePull(Button:Integer;Shift:Integer;X:Integer;Y:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.DoSurfacePull(Button,Shift,X,Y);
  except end;
End;

Procedure pcDoSurfacePush(Button:Integer;Shift:Integer;X:Integer;Y:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.DoSurfacePush(Button,Shift,X,Y);
  except end;
End;

Procedure pcDoSurfaceWheel(Shift:Integer;WheelDelta:Integer;X:Integer;Y:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.DoSurfaceWheel(Shift,WheelDelta,X,Y);
  except end;
End;

Function pcDoKeyStroke(ChCode:Integer;Shift:Integer):LongInt;stdcall;
var res:Boolean;
Begin
  try
    if assigned(CadControl) then res := CadControl.DoKeyStroke(ChCode,Shift);
    Result := LongInt(res);
  except end;
End;

Function pcCheckForGuideDrop(X:Integer;Y:Integer):LongInt;stdcall;
var res:Boolean;
Begin
  try
    if assigned(CadControl) then res := CadControl.CheckForGuideDrop(X,Y);
    Result := LongInt(res);
  except end;
End;

Procedure pcDragStarted;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.DragStarted;
  except end;
End;

Function pcGetSelectionRect:TDoubleRect;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.GetSelectionRect;
  except end;
End;

Function pcGetDrawingRect:TDoubleRect;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.GetDrawingRect;
  except end;
End;

Function pcGetVisibleRect:TDoubleRect;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.GetVisibleRect;
  except end;
End;

Procedure pcDeConvertXY(var X:Double;var Y:Double;var Z:Double);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.DeConvertXY(X,Y,Z);
  except end;
End;

Procedure pcDeConvertDim(var Dime:Double);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.DeConvertDim(Dime);
  except end;
End;

Procedure pcConvertXY(var X:Double;var Y:Double;var Z:Double);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.ConvertXY(X,Y,Z);
  except end;
End;

Procedure pcConvertDim(var Dime:Double);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.ConvertDim(Dime);
  except end;
End;

Procedure pcZoomArea(var ZoomRect:TDoubleRect);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.ZoomArea(ZoomRect);
  except end;
End;

Procedure pcFitToWindow;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.FitToWindow;
  except end;
End;

Procedure pcActualSize;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.ActualSize;
  except end;
End;

Procedure pcZoomOut;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.ZoomOut;
  except end;
End;

Procedure pcZoomIn;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.ZoomIn;
  except end;
End;

Procedure pcClearGuides;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.ClearGuides;
  except end;
End;

Procedure pcSetTool(aToolIndex:Integer;aToolInfo:PChar;aToolData:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.SetTool(TPCTool(aToolIndex),String(aToolInfo),aToolData);
  except end;
End;

Procedure pcSetCursor(cr:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.SetCursor(TCursor(cr));
  except end;
End;

Procedure pcSetDragCursor(cr:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.SetDragCursor(TCursor(cr));
  except end;
End;

Function pcCheckGuideLine(x:Double;y:Double):LongInt;stdcall;
var res:Boolean;
Begin
  try
    if assigned(CadControl) then res := CadControl.CheckGuideLine(x,y);
    Result := LongInt(res);
  except end;
End;

Procedure pcBeginHRulerDrag;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.BeginHRulerDrag;
  except end;
End;

Procedure pcBeginVRulerDrag;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.BeginVRulerDrag;
  except end;
End;

Function pcSurfaceWidth:Integer;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.SurfaceWidth;
  except end;
End;

Function pcSurfaceHeight:Integer;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.SurfaceHeight;
  except end;
End;

Procedure pcGetPageRect(var left:Integer;var top:Integer;var right:Integer;var bottom:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.GetPageRect(left,top,right,bottom);
  except end;
End;

Procedure pcSetSurfaceMargin(Value:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.SetSurfaceMargin(Value);
  except end;
End;

Procedure pcSetScrollPositions(hPos:Integer;vPos:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.SetScrollPositions(hPos,vPos);
  except end;
End;

Procedure pcSetHScrollPosition(hPos:Integer;Update:LongInt);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.SetHScrollPosition(hPos,Boolean(Update));
  except end;
End;

Procedure pcSetVScrollPosition(vPos:Integer;Update:LongInt);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.SetVScrollPosition(vPos,Boolean(Update));
  except end;
End;

Procedure pcSetHScrollDelta(hDelta:Double;Update:LongInt);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.SetHScrollDelta(hDelta,Boolean(Update));
  except end;
End;

Procedure pcSetVScrollDelta(hDelta:Double;Update:LongInt);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.SetVScrollDelta(hDelta,Boolean(Update));
  except end;
End;

Function pcHSCBarPosition:Integer;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.HSCBarPosition;
  except end;
End;

Function pcVSCBarPosition:Integer;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.VSCBarPosition;
  except end;
End;

Function pcPointInHScroll(x:Double;y:Double):LongInt;stdcall;
var res:Boolean;
Begin
  try
    if assigned(CadControl) then res := CadControl.PointInHScroll(x,y);
    Result := LongInt(res);
  except end;
End;

Function pcPointInVScroll(x:Double;y:Double):LongInt;stdcall;
var res:Boolean;
Begin
  try
    if assigned(CadControl) then res := CadControl.PointInVScroll(x,y);
    Result := LongInt(res);
  except end;
End;

Function pcPointInHRuler(x:Double;y:Double):LongInt;stdcall;
var res:Boolean;
Begin
  try
    if assigned(CadControl) then res := CadControl.PointInHRuler(x,y);
    Result := LongInt(res);
  except end;
End;

Function pcPointInVRuler(x:Double;y:Double):LongInt;stdcall;
var res:Boolean;
Begin
  try
    if assigned(CadControl) then res := CadControl.PointInVRuler(x,y);
    Result := LongInt(res);
  except end;
End;

Procedure pcCenterLocation(x:Double;y:Double);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.CenterLocation(x,y);
  except end;
End;

Function pcPointInView(x:Double;y:Double):LongInt;stdcall;
var res:Boolean;
Begin
  try
    if assigned(CadControl) then res := CadControl.PointInView(x,y);
    Result := LongInt(res);
  except end;
End;

Procedure pcZoomDetailPoint(var ZoomCenter:TDoublePoint);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.ZoomDetailPoint(ZoomCenter);
  except end;
End;

Function pcHitTestModPointInt(x:Double;y:Double):Integer;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.HitTestModPointInt(x,y);
  except end;
End;

Procedure pcSimulateTrace(x:Double;y:Double);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.SimulateTrace(x,y);
  except end;
End;

Procedure pcSimulateDown(x:Double;y:Double);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.SimulateDown(x,y);
  except end;
End;

Procedure pcSimulateUp(x:Double;y:Double);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.SimulateUp(x,y);
  except end;
End;

Procedure pcSimulateRightClick(x:Double;y:Double);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.SimulateRightClick(x,y);
  except end;
End;

Procedure pcSetSelectionHatch(HStyle:Integer;ForeColor:Integer;BackColor:Integer;StepSize:Double);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.SetSelectionHatch(THatchStyle(HStyle),TColor(ForeColor),TColor(BackColor),StepSize);
  except end;
End;

Procedure pcSetSelectionGradient(GStyle:Integer;ForeColor:Integer;BackColor:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.SetSelectionGradient(TGradStyle(GStyle),TColor(ForeColor),TColor(BackColor));
  except end;
End;

Procedure pcSetSelectionTexture(TStyle:Integer;TexSize:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.SetSelectionTexture(TTextureStyle(TStyle),TexSize);
  except end;
End;

Function pcNewLayer(LayerName:PChar):Integer;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.NewLayer(string(LayerName));
  except end;
End;

Function pcDeleteLayer(LayerName:PChar):LongInt;stdcall;
var res:boolean;
Begin
  try
    if assigned(CadControl) then res := CadControl.DeleteLayer(string(LayerName));
    Result := LongInt(res);
  except end;
End;

Function pcDeleteLayerWithNbr(LayerNbr:Integer):LongInt;stdcall;
var res:boolean;
Begin
  try
    if assigned(CadControl) then res := CadControl.DeleteLayerWithNbr(LayerNbr);
    Result := LongInt(res);
  except end;
End;

Procedure pcDeleteAllUserLayers;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.DeleteAllUserLayers;
  except end;
End;

Procedure pcUnDo;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.UnDo;
  except end;
End;

Procedure pcReDo;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.ReDo;
  except end;
End;

Procedure pcClearUndoList;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.ClearUndoList;
  except end;
End;

Procedure pcShowLayer(LayerNbr:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.ShowLayer(LayerNbr);
  except end;
End;

Procedure pcHideLayer(LayerNbr:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.HideLayer(LayerNbr);
  except end;
End;

Procedure pcHideAllLayers;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.HideAllLayers;
  except end;
End;

Procedure pcGrayLayer(LayerNbr:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.GrayLayer(LayerNbr);
  except end;
End;

Procedure pcExGrayLayer(LayerNbr:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.ExGrayLayer(LayerNbr);
  except end;
End;

Procedure pcExHideLayer(LayerNbr:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.ExHideLayer(LayerNbr);
  except end;
End;

Procedure pcShowAllLayers;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.ShowAllLayers;
  except end;
End;

Procedure pcMergeAllLayers;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.MergeAllLayers;
  except end;
End;

Procedure pcMergeVisibleLayers;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.MergeVisibleLayers;
  except end;
End;

Function pcGetLayerName(LayerNbr:Integer):PChar;stdcall;
var res:String;
Begin
  try
    if assigned(CadControl) then res := CadControl.GetLayerName(LayerNbr);
    Result := PChar(res);
  except end;
End;

Function pcGetLayerHandle(LayerNbr:Integer):Integer;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.GetLayerHandle(LayerNbr);
  except end;
End;

Function pcGetLayerVisible(LayerNbr:Integer):LongInt;stdcall;
var res:Boolean;
Begin
  try
    if assigned(CadControl) then res := CadControl.GetLayerVisible(LayerNbr);
    Result := LongInt(res);
  except end;
End;

Function pcGetLayerGrayed(LayerNbr:Integer):LongInt;stdcall;
var res:Boolean;
Begin
  try
    if assigned(CadControl) then res := CadControl.GetLayerGrayed(LayerNbr);
    Result := LongInt(res);
  except end;
End;

Function pcGetSelectedHandle(index:Integer):Integer;stdcall;
var res:TFigHandle;
Begin
  try
    if assigned(CadControl) then res := CadControl.GetSelectedHandle(index);
    Result := Integer(res);
  except end;
End;

Function pcFigureGetHandle(FigureIndex:Integer):Integer;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.FigureGetHandle(FigureIndex);
  except end;
End;

Function pcFigureGetName(FigureHandle:Integer):PChar;stdcall;
var res:String;
Begin
  try
    if assigned(CadControl) then res := CadControl.FigureGetName(FigureHandle);
    Result := PChar(res);
  except end;
End;

Function pcFigureGetClass(FigureHandle:Integer):PChar;stdcall;
var res:String;
Begin
  try
    if assigned(CadControl) then res := CadControl.FigureGetClass(FigureHandle);
    Result := PChar(res);
  except end;
End;

Function pcFigureGetPointCount(FigureHandle:Integer):Integer;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.FigureGetPointCount(FigureHandle);
  except end;
End;

Function pcFigureGetPoint(FigureHandle:Integer;pIndex:Integer):TDoublePoint;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.FigureGetPoint(FigureHandle,pIndex);
  except end;
End;

Function pcFigureGetDCPoint(FigureHandle:Integer;pIndex:Integer):TDoublePoint;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.FigureGetDCPoint(FigureHandle,pIndex);
  except end;
End;

Function pcFigureGetCenter(FigureHandle:Integer):TDoublePoint;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.FigureGetCenter(FigureHandle);
  except end;
End;

Function pcFigureGetRect(FigureHandle:Integer):TDoubleRect;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.FigureGetRect(FigureHandle);
  except end;
End;

Function pcFigureGetRadius(FigureHandle:Integer):Double;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.FigureGetRadius(FigureHandle);
  except end;
End;

Function pcFigureGetFontName(FigureHandle:Integer):PChar;stdcall;
var res:String;
Begin
  try
    if assigned(CadControl) then res := CadControl.FigureGetFontName(FigureHandle);
    Result := PChar(res);
  except end;
End;

Function pcFigureGetFontBold(FigureHandle:Integer):LongInt;stdcall;
var res:Boolean;
Begin
  try
    if assigned(CadControl) then res := CadControl.FigureGetFontBold(FigureHandle);
    Result := LongInt(res);
  except end;
End;

Function pcFigureGetFontItalic(FigureHandle:Integer):LongInt;stdcall;
var res:Boolean;
Begin
  try
    if assigned(CadControl) then res := CadControl.FigureGetFontItalic(FigureHandle);
    Result := LongInt(res);
  except end;
End;

Function pcFigureGetFontUnderline(FigureHandle:Integer):LongInt;stdcall;
var res:Boolean;
Begin
  try
    if assigned(CadControl) then res := CadControl.FigureGetFontUnderline(FigureHandle);
    Result := LongInt(res);
  except end;
End;

Function pcFigureGetFontStrike(FigureHandle:Integer):LongInt;stdcall;
var res:Boolean;
Begin
  try
    if assigned(CadControl) then res := CadControl.FigureGetFontStrike(FigureHandle);
    Result := LongInt(res);
  except end;
End;

Function pcFigureGetFontSize(FigureHandle:Integer):Double;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.FigureGetFontSize(FigureHandle);
  except end;
End;

Function pcFigureGetFontCharset(FigureHandle:Integer):Integer;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.FigureGetFontCharset(FigureHandle);
  except end;
End;

Function pcFigureGetFontColor(FigureHandle:Integer):Integer;stdcall;
var res:TColor;
Begin
  try
    if assigned(CadControl) then res := CadControl.FigureGetFontColor(FigureHandle);
    Result := Integer(res);
  except end;
End;

Function pcFigureGetPenColor(FigureHandle:Integer):Integer;stdcall;
var res:TColor;
Begin
  try
    if assigned(CadControl) then res := CadControl.FigureGetPenColor(FigureHandle);
    Result := Integer(res);
  except end;
End;

Function pcFigureGetBrushColor(FigureHandle:Integer):Integer;stdcall;
var res:TColor;
Begin
  try
    if assigned(CadControl) then res := CadControl.FigureGetBrushColor(FigureHandle);
    Result := Integer(res);
  except end;
End;

Function pcFigureGetPenStyle(FigureHandle:Integer):Integer;stdcall;
var res:TPenStyle;
Begin
  try
    if assigned(CadControl) then res := CadControl.FigureGetPenStyle(FigureHandle);
    Result := Integer(res);
  except end;
End;

Function pcFigureGetBrushStyle(FigureHandle:Integer):Integer;stdcall;
var res:TBrushStyle;
Begin
  try
    if assigned(CadControl) then res := CadControl.FigureGetBrushStyle(FigureHandle);
    Result := Integer(res);
  except end;
End;

Function pcFigureGetRowStyle(FigureHandle:Integer):Integer;stdcall;
var res:TRowStyle;
Begin
  try
    if assigned(CadControl) then res := CadControl.FigureGetRowStyle(FigureHandle);
    Result := Integer(res);
  except end;
End;

Function pcFigureGetPenWidth(FigureHandle:Integer):Integer;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.FigureGetPenWidth(FigureHandle);
  except end;
End;

Function pcFigureGetInfo(FigureHandle:Integer):PChar;stdcall;
var res:String;
Begin
  try
    if assigned(CadControl) then res := CadControl.FigureGetInfo(FigureHandle);
    Result := PChar(res);
  except end;
End;

Function pcFigureGetAngle(FigureHandle:Integer):Double;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.FigureGetAngle(FigureHandle);
  except end;
End;

Function pcFigureGetLayerHandle(FigureHandle:Integer):Integer;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.FigureGetLayerHandle(FigureHandle);
  except end;
End;

Function pcFigureGetDiagonal(FigureHandle:Integer):LongInt;stdcall;
var res:Boolean;
Begin
  try
    if assigned(CadControl) then res := CadControl.FigureGetDiagonal(FigureHandle);
    Result := LongInt(res);
  except end;
End;

Function pcFigureGetLockMove(FigureHandle:Integer):LongInt;stdcall;
var res:Boolean;
Begin
  try
    if assigned(CadControl) then res := CadControl.FigureGetLockMove(FigureHandle);
    Result := LongInt(res);
  except end;
End;

Function pcFigureGetLockModify(FigureHandle:Integer):LongInt;stdcall;
var res:Boolean;
Begin
  try
    if assigned(CadControl) then res := CadControl.FigureGetLockModify(FigureHandle);
    Result := LongInt(res);
  except end;
End;

Function pcFigureGetSelected(FigureHandle:Integer):LongInt;stdcall;
var res:Boolean;
Begin
  try
    if assigned(CadControl) then res := CadControl.FigureGetSelected(FigureHandle);
    Result := LongInt(res);
  except end;
End;

Function pcFigureTestPoint(FigureHandle:Integer;var TestPoint:TDoublePoint):LongInt;stdcall;
var res:Boolean;
Begin
  try
    if assigned(CadControl) then res := CadControl.FigureTestPoint(FigureHandle,TestPoint);
    Result := LongInt(res);
  except end;
End;

Function pcFigureTestRect(FigureHandle:Integer;var TestRect:TDoubleRect):LongInt;stdcall;
var res:Boolean;
Begin
  try
    if assigned(CadControl) then res := CadControl.FigureTestRect(FigureHandle,TestRect);
    Result := LongInt(res);
  except end;
End;

Function pcFigureGetRgnHandle(FigureHandle:Integer):Integer;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.FigureGetRgnHandle(FigureHandle);
  except end;
End;

Procedure pcFigureSelect(FigureHandle:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.FigureSelect(FigureHandle);
  except end;
End;

Procedure pcFigureSelectAsRotate(FigureHandle:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.FigureSelectAsRotate(FigureHandle);
  except end;
End;

Procedure pcFigureDeSelect(FigureHandle:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.FigureDeSelect(FigureHandle);
  except end;
End;

Procedure pcFigureEdit(FigureHandle:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.FigureEdit(FigureHandle);
  except end;
End;

Procedure pcFigureMove(FigureHandle:Integer;deltax:Double;deltay:Double);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.FigureMove(FigureHandle,deltax,deltay);
  except end;
End;

Procedure pcFigureRotate(FigureHandle:Integer;Angle:Double);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.FigureRotate(FigureHandle,Angle);
  except end;
End;

Procedure pcFigureRotateByPoint(FigureHandle:Integer;Angle:Double;var cPoint:TDoublePoint);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.FigureRotateByPoint(FigureHandle,Angle,cPoint);
  except end;
End;

Procedure pcFigureMirror(FigureHandle:Integer;var Point1:TDoublePoint;var Point2:TDoublePoint);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.FigureMirror(FigureHandle,Point1,Point2);
  except end;
End;

Procedure pcFigureScale(FigureHandle:Integer;px:Double;py:Double);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.FigureScale(FigureHandle,px,py);
  except end;
End;

Procedure pcFigureScaleByPoint(FigureHandle:Integer;px:Double;py:Double;var rPoint:TDoublePoint);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.FigureScaleByPoint(FigureHandle,px,py,rPoint);
  except end;
End;

Procedure pcFigureSetFontName(FigureHandle:Integer;value:PChar);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.FigureSetFontName(FigureHandle,String(value));
  except end;
End;

Procedure pcFigureSetFontBold(FigureHandle:Integer;value:LongInt);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.FigureSetFontBold(FigureHandle,Boolean(value));
  except end;
End;

Procedure pcFigureSetFontItalic(FigureHandle:Integer;value:LongInt);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.FigureSetFontItalic(FigureHandle,Boolean(value));
  except end;
End;

Procedure pcFigureSetFontUnderline(FigureHandle:Integer;value:LongInt);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.FigureSetFontUnderline(FigureHandle,Boolean(value));
  except end;
End;

Procedure pcFigureSetFontStrike(FigureHandle:Integer;value:LongInt);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.FigureSetFontStrike(FigureHandle,Boolean(value));
  except end;
End;

Procedure pcFigureSetFontSize(FigureHandle:Integer;value:Double);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.FigureSetFontSize(FigureHandle,value);
  except end;
End;

Procedure pcFigureSetFontCharset(FigureHandle:Integer;value:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.FigureSetFontCharset(FigureHandle,value);
  except end;
End;

Procedure pcFigureSetFontColor(FigureHandle:Integer;value:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.FigureSetFontColor(FigureHandle,TColor(value));
  except end;
End;

Procedure pcFigureSetPenColor(FigureHandle:Integer;value:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.FigureSetPenColor(FigureHandle,TColor(value));
  except end;
End;

Procedure pcFigureSetBrushColor(FigureHandle:Integer;value:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.FigureSetBrushColor(FigureHandle,TColor(value));
  except end;
End;

Procedure pcFigureSetPenStyle(FigureHandle:Integer;value:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.FigureSetPenStyle(FigureHandle,TPenStyle(value));
  except end;
End;

Procedure pcFigureSetBrushStyle(FigureHandle:Integer;value:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.FigureSetBrushStyle(FigureHandle,TBrushStyle(value));
  except end;
End;

Procedure pcFigureSetRowStyle(FigureHandle:Integer;value:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.FigureSetRowStyle(FigureHandle,TRowStyle(value));
  except end;
End;

Procedure pcFigureSetPenWidth(FigureHandle:Integer;value:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.FigureSetPenWidth(FigureHandle,value);
  except end;
End;

Procedure pcFigureSetPoint(FigureHandle:Integer;pIndex:Integer;var fPoint:TDoublePoint);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.FigureSetPoint(FigureHandle,pIndex,fPoint);
  except end;
End;

Procedure pcFigureSetInfo(FigureHandle:Integer;value:PChar);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.FigureSetInfo(FigureHandle,String(value));
  except end;
End;

Procedure pcFigureSetAngle(FigureHandle:Integer;value:Double);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.FigureSetAngle(FigureHandle,value);
  except end;
End;

Procedure pcFigureSetLayerHandle(FigureHandle:Integer;value:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.FigureSetLayerHandle(FigureHandle,value);
  except end;
End;

Procedure pcFigureSetDiagonal(FigureHandle:Integer;value:LongInt);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.FigureSetDiagonal(FigureHandle,Boolean(value));
  except end;
End;

Procedure pcFigureSetLockMove(FigureHandle:Integer;value:LongInt);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.FigureSetLockMove(FigureHandle,Boolean(value));
  except end;
End;

Procedure pcFigureSetLockModify(FigureHandle:Integer;value:LongInt);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.FigureSetLockModify(FigureHandle,Boolean(value));
  except end;
End;

Procedure pcFigureSetRgnHandle(FigureHandle:Integer;Rgn:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.FigureSetRgnHandle(FigureHandle,Rgn);
  except end;
End;

Function pcGetDCPoint(var p:TDoublePoint):TDoublePoint;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.GetDCPoint(p);
  except end;
End;

Function pcGetDCLen(l:Double):Integer;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.GetDCLen(l);
  except end;
End;

Function pcFigureGrpGetFigureCount(FigureHandle:Integer):Integer;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.FigureGrpGetFigureCount(FigureHandle);
  except end;
End;

Function pcFigureGrpGetFigureHandle(FigureHandle:Integer;fIndex:Integer):Integer;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.FigureGrpGetFigureHandle(FigureHandle,fIndex);
  except end;
End;

Function pcFigureGrpGetCombined(FigureHandle:Integer):LongInt;stdcall;
var res:Boolean;
Begin
  try
    if assigned(CadControl) then res := CadControl.FigureGrpGetCombined(FigureHandle);
    Result := LongInt(res);
  except end;
End;

Procedure pcFigureGrpSetCombined(FigureHandle:Integer;Value:LongInt);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.FigureGrpSetCombined(FigureHandle,Boolean(Value));
  except end;
End;

Procedure pcFigureGrpUngroup(FigureHandle:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.FigureGrpUngroup(FigureHandle);
  except end;
End;

Function pcFigureBlockGetBlockname(FigureHandle:Integer):PChar;stdcall;
var res:String;
Begin
  try
    if assigned(CadControl) then res := CadControl.FigureBlockGetBlockname(FigureHandle);
    Result := PChar(res);
  except end;
End;

Function pcFigureGetJoin1(FigureHandle:Integer):Integer;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.FigureGetJoin1(FigureHandle);
  except end;
End;

Function pcFigureGetJoin2(FigureHandle:Integer):Integer;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.FigureGetJoin2(FigureHandle);
  except end;
End;

Procedure pcFigureSetJoin1(FigureHandle:Integer;JHandle:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.FigureSetJoin1(FigureHandle,JHandle);
  except end;
End;

Procedure pcFigureSetJoin2(FigureHandle:Integer;JHandle:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.FigureSetJoin2(FigureHandle,JHandle);
  except end;
End;

Function pcFigureGetClosed(FigureHandle:Integer):LongInt;stdcall;
var res:Boolean;
Begin
  try
    if assigned(CadControl) then res := CadControl.FigureGetClosed(FigureHandle);
    Result := LongInt(res);
  except end;
End;

Procedure pcFigureSetClosed(FigureHandle:Integer;Closed:LongInt);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.FigureSetClosed(FigureHandle,Boolean(Closed));
  except end;
End;

Function pcFigureGetControlPoint(FigureHandle:Integer;SegmentIndex:Integer;pIndex:Integer):TDoublePoint;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.FigureGetControlPoint(FigureHandle,SegmentIndex,pIndex);
  except end;
End;

Procedure pcFigureSetControlPoints(FigureHandle:Integer;SegmentIndex:Integer;var cPoint1:TDoublePoint;var cPoint2:TDoublePoint);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.FigureSetControlPoints(FigureHandle,SegmentIndex,cPoint1,cPoint2);
  except end;
End;

Function pcFigureGetSegmentType(FigureHandle:Integer;SegmentIndex:Integer):Integer;stdcall;
var res:TSegmentType;
Begin
  try
    if assigned(CadControl) then res := CadControl.FigureGetSegmentType(FigureHandle,SegmentIndex);
    Result := Integer(res);
  except end;
End;

Procedure pcFigureSetSegmentType(FigureHandle:Integer;SegmentIndex:Integer;SegType:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.FigureSetSegmentType(FigureHandle,SegmentIndex,TSegmentType(SegType));
  except end;
End;

Procedure pcFigureInvertArcSegment(FigureHandle:Integer;SegmentIndex:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.FigureInvertArcSegment(FigureHandle,SegmentIndex);
  except end;
End;

Procedure pcFigureConvertPLBezier(FigureHandle:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.FigureConvertPLBezier(FigureHandle);
  except end;
End;

Procedure pcFigureConvertPLPolyline(FigureHandle:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.FigureConvertPLPolyline(FigureHandle);
  except end;
End;

Function pcFigureGetElpALen(FigureHandle:Integer):Double;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.FigureGetElpALen(FigureHandle);
  except end;
End;

Function pcFigureGetElpBLen(FigureHandle:Integer):Double;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.FigureGetElpBLen(FigureHandle);
  except end;
End;

Function pcFigureGetArcStyle(FigureHandle:Integer):Integer;stdcall;
var res:TArcStyle;
Begin
  try
    if assigned(CadControl) then res := CadControl.FigureGetArcStyle(FigureHandle);
    Result := Integer(res);
  except end;
End;

Procedure pcFigureSetArcStyle(FigureHandle:Integer;aStyle:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.FigureSetArcStyle(FigureHandle,TArcStyle(aStyle));
  except end;
End;

Procedure pcFigureInvertArc(FigureHandle:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.FigureInvertArc(FigureHandle);
  except end;
End;

Function pcFigureGetArcSAngle(FigureHandle:Integer):Double;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.FigureGetArcSAngle(FigureHandle);
  except end;
End;

Function pcFigureGetArcFAngle(FigureHandle:Integer):Double;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.FigureGetArcFAngle(FigureHandle);
  except end;
End;

Procedure pcFigureSetArcAngles(FigureHandle:Integer;SAngle:Double;FAngle:Double);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.FigureSetArcAngles(FigureHandle,SAngle,FAngle);
  except end;
End;

Function pcFigureGetRichText(FigureHandle:Integer):PChar;stdcall;
var res:String;
Begin
  try
    if assigned(CadControl) then res := CadControl.FigureGetRichText(FigureHandle);
    Result := PChar(res);
  except end;
End;

Procedure pcFigureSetRichText(FigureHandle:Integer;rText:PChar);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.FigureSetRichText(FigureHandle,String(rText));
  except end;
End;

Function pcFigureGetPictureName(FigureHandle:Integer):PChar;stdcall;
var res:String;
Begin
  try
    if assigned(CadControl) then res := CadControl.FigureGetPictureName(FigureHandle);
    Result := PChar(res);
  except end;
End;

Function pcFigureGetTransparent(FigureHandle:Integer):LongInt;stdcall;
var res:Boolean;
Begin
  try
    if assigned(CadControl) then res := CadControl.FigureGetTransparent(FigureHandle);
    Result := LongInt(res);
  except end;
End;

Procedure pcFigureSetTransparent(FigureHandle:Integer;Value:LongInt);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.FigureSetTransparent(FigureHandle,Boolean(Value));
  except end;
End;

Procedure pcFigureFlipHorz(FigureHandle:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.FigureFlipHorz(FigureHandle);
  except end;
End;

Procedure pcFigureFlipVert(FigureHandle:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.FigureFlipVert(FigureHandle);
  except end;
End;

Procedure pcFigureSkewBitmap(FigureHandle:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.FigureSkewBitmap(FigureHandle);
  except end;
End;

Procedure pcFigureSaveBitmapToFile(FigureHandle:Integer;Fname:PChar);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.FigureSaveBitmapToFile(FigureHandle,String(Fname));
  except end;
End;

Procedure pcFigureLoadBitmapFromFile(FigureHandle:Integer;Fname:PChar);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.FigureLoadBitmapFromFile(FigureHandle,String(Fname));
  except end;
End;

Function pcFigureGetText(FigureHandle:Integer):PChar;stdcall;
var res:String;
Begin
  try
    if assigned(CadControl) then res := CadControl.FigureGetText(FigureHandle);
    Result := PChar(res);
  except end;
End;

Procedure pcFigureSetText(FigureHandle:Integer;Value:PChar);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.FigureSetText(FigureHandle,String(Value));
  except end;
End;

Function pcDrawUserFigureEvent(Cname:PChar;DC:Integer;Handle:Integer;isGrayed:LongInt):LongInt;stdcall;
var res:Boolean;
Begin
  try
    if assigned(CadControl) then res := CadControl.DrawUserFigureEvent(String(Cname),DC,Handle,Boolean(isGrayed));
    Result := LongInt(res);
  except end;
End;

Function pcPointInUserFigureEvent(Cname:PChar;Handle:Integer;x:Double;y:Double;var Test:LongInt):LongInt;stdcall;
var cnTest:Boolean;
var res:Boolean;
Begin
  try
    cnTest := Boolean(Test);
    if assigned(CadControl) then res := CadControl.PointInUserFigureEvent(String(Cname),Handle,x,y,cnTest);
    Result := LongInt(res);
    Test := LongInt(cnTest);
  except end;
End;

Procedure pcDraw;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.Draw;
  except end;
End;

Procedure pcDrawFigures;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.DrawFigures;
  except end;
End;

Procedure pcDrawSelectedFigures;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.DrawSelectedFigures;
  except end;
End;

Procedure pcDrawSelectionPoints;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.DrawSelectionPoints;
  except end;
End;

Procedure pcDrawFigureGuides;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.DrawFigureGuides;
  except end;
End;

Procedure pcSelectAll(LayerNbr:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.SelectAll(LayerNbr);
  except end;
End;

Procedure pcDeselectAll(LayerNbr:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.DeselectAll(LayerNbr);
  except end;
End;

Procedure pcInvertSelection;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.InvertSelection;
  except end;
End;

Function pcGroupSelection:Integer;stdcall;
var res:TFigHandle;
Begin
  try
    if assigned(CadControl) then res := CadControl.GroupSelection;
    Result := Integer(res);
  except end;
End;

Procedure pcUngroupSelection;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.UngroupSelection;
  except end;
End;

Procedure pcOrderSelection(Dest:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.OrderSelection(TOrderStyle(Dest));
  except end;
End;

Procedure pcRemoveSelection;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.RemoveSelection;
  except end;
End;

Procedure pcRotateSelectionCenter(Angle:Double);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.RotateSelectionCenter(Angle);
  except end;
End;

Procedure pcRotateSelection(Angle:Double;var rPoint:TDoublePoint);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.RotateSelection(Angle,rPoint);
  except end;
End;

Procedure pcMirrorSelection(var Point1:TDoublePoint;var Point2:TDoublePoint;Dupl:LongInt);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.MirrorSelection(Point1,Point2,boolean(Dupl));
  except end;
End;

Procedure pcKnifeSelection(var Point1:TDoublePoint;var Point2:TDoublePoint);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.KnifeSelection(Point1,Point2);
  except end;
End;

Procedure pcCreateDimLinesOfSelection;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.CreateDimLinesOfSelection;
  except end;
End;

Procedure pcClearDimLinesOfSelection;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.ClearDimLinesOfSelection;
  except end;
End;

Procedure pcInterBreakSelection;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.InterBreakSelection;
  except end;
End;

Procedure pcLockSelectionToMove(Locked:LongInt);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.LockSelectionToMove(Boolean(Locked));
  except end;
End;

Procedure pcLockSelectionToModify(Locked:LongInt);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.LockSelectionToModify(Boolean(Locked));
  except end;
End;

Procedure pcInvertArcsOfSelection;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.InvertArcsOfSelection;
  except end;
End;

Procedure pcArrangeArcStyleOfSelection(Value:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.ArrangeArcStyleOfSelection(TArcStyle(Value));
  except end;
End;

Procedure pcCloseSelectedPolyline;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.CloseSelectedPolyline;
  except end;
End;

Procedure pcOpenSelectedPolyline;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.OpenSelectedPolyline;
  except end;
End;

Procedure pcSimplfySelectedPolyline;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.SimplfySelectedPolyline;
  except end;
End;

Procedure pcNameSelection;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.NameSelection;
  except end;
End;

Procedure pcConvertPLToBezier;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.ConvertPLToBezier;
  except end;
End;

Procedure pcConvertPLToPolyline;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.ConvertPLToPolyline;
  except end;
End;

Procedure pcFlipImagesOfSelection(FlipMode:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.FlipImagesOfSelection(TFlipMode(FlipMode));
  except end;
End;

Procedure pcsetTransparentOfSelection(Transparent:LongInt);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.setTransparentOfSelection(Boolean(Transparent));
  except end;
End;

Procedure pcScaleSelection(percentX:Double;percentY:Double;var rPoint:TDoublePoint);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.ScaleSelection(percentX,percentY,rPoint);
  except end;
End;

Procedure pcScaleDrawing(percentx:Double;percenty:Double);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.ScaleDrawing(percentx,percenty);
  except end;
End;

Procedure pcModifyFontName(value:PChar);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.ModifyFontName(String(value));
  except end;
End;

Procedure pcModifyFontBold(value:LongInt);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.ModifyFontBold(Boolean(value));
  except end;
End;

Procedure pcModifyFontItalic(value:LongInt);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.ModifyFontItalic(Boolean(value));
  except end;
End;

Procedure pcModifyFontUnderline(value:LongInt);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.ModifyFontUnderline(Boolean(value));
  except end;
End;

Procedure pcModifyFontStrike(value:LongInt);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.ModifyFontStrike(Boolean(value));
  except end;
End;

Procedure pcModifyFontSize(value:Double);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.ModifyFontSize(value);
  except end;
End;

Procedure pcModifyFontCharset(value:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.ModifyFontCharset(value);
  except end;
End;

Procedure pcModifyFontColor(value:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.ModifyFontColor(TColor(value));
  except end;
End;

Procedure pcModifyPenColor(value:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.ModifyPenColor(TColor(value));
  except end;
End;

Procedure pcModifyBrushColor(value:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.ModifyBrushColor(TColor(value));
  except end;
End;

Procedure pcModifyPenStyle(value:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.ModifyPenStyle(TPenStyle(value));
  except end;
End;

Procedure pcModifyBrushStyle(value:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.ModifyBrushStyle(TBrushStyle(value));
  except end;
End;

Procedure pcModifyRowStyle(value:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.ModifyRowStyle(TRowStyle(value));
  except end;
End;

Procedure pcModifyPenWidth(value:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.ModifyPenWidth(value);
  except end;
End;

Function pcIsTextSelected:LongInt;stdcall;
var res:Boolean;
Begin
  try
    if assigned(CadControl) then res := CadControl.IsTextSelected;
    Result := LongInt(res);
  except end;
End;

Procedure pcGetSelectionBoundS(var MaxX:Double;var MaxY:Double;var MinX:Double;var MinY:Double);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.GetSelectionBoundS(MaxX,MaxY,MinX,MinY);
  except end;
End;

Procedure pcGetDrawingBounds(var MaxX:Double;var MaxY:Double;var MinX:Double;var MinY:Double);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.GetDrawingBounds(MaxX,MaxY,MinX,MinY);
  except end;
End;

Procedure pcReDrawSelection;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.ReDrawSelection;
  except end;
End;

Procedure pcReDrawSelectionPoints;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.ReDrawSelectionPoints;
  except end;
End;

Procedure pcManualRefresh;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.ManualRefresh;
  except end;
End;

Procedure pcRefreshSelection;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.RefreshSelection;
  except end;
End;

Procedure pcReselect;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.Reselect;
  except end;
End;

Function pcGetSurfaceBitmapHandle:Integer;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.GetSurfaceBitmapHandle;
  except end;
End;

Function pcSelectByPoint(LayerNbr:Integer;x:Double;y:Double;shiftpressed:LongInt):LongInt;stdcall;
var res:Boolean;
Begin
  try
    if assigned(CadControl) then res := CadControl.SelectByPoint(LayerNbr,x,y,boolean(shiftpressed));
    Result := LongInt(res);
  except end;
End;

Function pcDoMagicWand(LayerNbr:Integer;x:Double;y:Double):Integer;stdcall;
var res:TFigHandle;
Begin
  try
    if assigned(CadControl) then res := CadControl.DoMagicWand(LayerNbr,x,y);
    Result := Integer(res);
  except end;
End;

Function pcSelectByFigure(LayerNbr:Integer;Fig:Integer;shiftpressed:LongInt):LongInt;stdcall;
var res:Boolean;
Begin
  try
    if assigned(CadControl) then res := CadControl.SelectByFigure(LayerNbr,TFigHandle(Fig),boolean(shiftpressed));
    Result := LongInt(res);
  except end;
End;

Function pcSelectWithInArea(LayerNbr:Integer;var area:TDoubleRect;shiftpressed:LongInt):LongInt;stdcall;
var res:Boolean;
Begin
  try
    if assigned(CadControl) then res := CadControl.SelectWithInArea(LayerNbr,area,boolean(shiftpressed));
    Result := LongInt(res);
  except end;
End;

Procedure pcSelectFigure(FHandle:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.SelectFigure(FHandle);
  except end;
End;

Procedure pcDeSelectFigure(FHandle:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.DeSelectFigure(FHandle);
  except end;
End;

Procedure pcMoveSelection(deltax:Double;deltay:Double);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.MoveSelection(deltax,deltay);
  except end;
End;

Procedure pcMoveAll(deltax:Double;deltay:Double);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.MoveAll(deltax,deltay);
  except end;
End;

Procedure pcMoveAllSilent(deltax:Double;deltay:Double);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.MoveAllSilent(deltax,deltay);
  except end;
End;

Procedure pcDuplicateSelection(deltax:Double;deltay:Double);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.DuplicateSelection(deltax,deltay);
  except end;
End;

Procedure pcDuplicateSelectionAsBezier(deltax:Double;deltay:Double);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.DuplicateSelectionAsBezier(deltax,deltay);
  except end;
End;

Procedure pcConvertSelectionToBezier;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.ConvertSelectionToBezier;
  except end;
End;

Procedure pcArrayRectSelection(distanceX:Double;distanceY:Double;col:Integer;row:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.ArrayRectSelection(distanceX,distanceY,col,row);
  except end;
End;

Procedure pcArrayPolarSelection(var cpoint:TDoublePoint;angle:Double);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.ArrayPolarSelection(cpoint,angle);
  except end;
End;

Procedure pcMakeSelectionBlock(FileName:PChar);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.MakeSelectionBlock(string(FileName));
  except end;
End;

Procedure pcBoundSelectedLine;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.BoundSelectedLine;
  except end;
End;

Procedure pcBoundLineToFigures(BLine:Integer;jf1:Integer;jf2:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.BoundLineToFigures(TFigHandle(BLine),TFigHandle(jf1),TFigHandle(jf2));
  except end;
End;

Procedure pcBoundLinePoint(BLine:Integer;seqnbr:Integer;var bPoint:TDoublePoint);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.BoundLinePoint(TFigHandle(BLine),seqnbr,bPoint);
  except end;
End;

Procedure pcUnBoundLine;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.UnBoundLine;
  except end;
End;

Function pcMakeSelectedLinesPolyline:Integer;stdcall;
var res:TFigHandle;
Begin
  try
    if assigned(CadControl) then res := CadControl.MakeSelectedLinesPolyline;
    Result := Integer(res);
  except end;
End;

Function pcWeldIntoPolyline:Integer;stdcall;
var res:TFigHandle;
Begin
  try
    if assigned(CadControl) then res := CadControl.WeldIntoPolyline;
    Result := Integer(res);
  except end;
End;

Procedure pcOffSetSelection(Thick:Double);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.OffSetSelection(Thick);
  except end;
End;

Procedure pcClipSelBitmapToSelFigure;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.ClipSelBitmapToSelFigure;
  except end;
End;

Procedure pcUnClipSelBitmap;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.UnClipSelBitmap;
  except end;
End;

Procedure pcSaveToFile(LayerNbr:Integer;FileName:PChar);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.SaveToFile(LayerNbr,string(FileName));
  except end;
End;

Procedure pcLoadFromFile(FileName:PChar);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.LoadFromFile(string(FileName));
  except end;
End;

Function pcInsertBlockwithFileName(LayerNbr:Integer;FileName:PChar;x:Double;y:Double):Integer;stdcall;
var res:TFigHandle;
Begin
  try
    if assigned(CadControl) then res := CadControl.InsertBlockwithFileName(LayerNbr,string(FileName),x,y);
    Result := Integer(res);
  except end;
End;

Procedure pcSetBlockInfo(FigHandle:Integer;Info:PChar);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.SetBlockInfo(FigHandle,String(Info));
  except end;
End;

Procedure pcExportAsWmf(FileName:PChar);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.ExportAsWmf(string(FileName));
  except end;
End;

Procedure pcExportAsDxf(FileName:PChar);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.ExportAsDxf(string(FileName));
  except end;
End;

Function pcSelectionAsMetaFile:Integer;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.SelectionAsMetaFile;
  except end;
End;

Function pcDrawingAsMetaFile:Integer;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.DrawingAsMetaFile;
  except end;
End;

Function pcFigureAsMetaFile(FigHandle:Integer):Integer;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.FigureAsMetaFile(TFigHandle(FigHandle));
  except end;
End;

Function pcSelectionAsBmpHandle(dpi:Integer):Integer;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.SelectionAsBmpHandle(dpi);
  except end;
End;

Procedure pcSaveAsBitmap(FileName:PChar);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.SaveAsBitmap(string(FileName));
  except end;
End;

Function pcCreatePreviewBitmapHandle:Integer;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.CreatePreviewBitmapHandle;
  except end;
End;

Procedure pcDrawToDC(dc:Integer;x:Integer;y:Integer;DScale:Double);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.DrawToDC(dc,x,y,DScale);
  except end;
End;

Procedure pcStretchToDC(dc:Integer;aLeft:Integer;aTop:Integer;aRight:Integer;aBottom:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.StretchToDC(dc,aLeft,aTop,aRight,aBottom);
  except end;
End;

Procedure pcPrintDrawing(TitleinStatusBox:PChar);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.PrintDrawing(String(TitleinStatusBox));
  except end;
End;

Procedure pcPrintDrawingAsWmf(TitleinStatusBox:PChar);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.PrintDrawingAsWmf(String(TitleinStatusBox));
  except end;
End;

Procedure pcPrnStartJob(TitleinStatusBox:PChar);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.PrnStartJob(String(TitleinStatusBox));
  except end;
End;

Procedure pcPrnDoJob(NewPage:LongInt);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.PrnDoJob(Boolean(NewPage));
  except end;
End;

Procedure pcPrnEndJob;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.PrnEndJob;
  except end;
End;

Procedure pcPrnAbortJob;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.PrnAbortJob;
  except end;
End;

Procedure pcPrintByTiling(TitleinStatusBox:PChar;prWmm:Double;prHmm:Double);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.PrintByTiling(String(TitleinStatusBox),prWmm,prHmm);
  except end;
End;

Procedure pcImportDXF(fileName:PChar;Layered:LongInt;IncVertex:LongInt);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.ImportDXF(string(fileName),Boolean(Layered),Boolean(IncVertex));
  except end;
End;

Procedure pcClear(LayerNbr:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.Clear(LayerNbr);
  except end;
End;

Procedure pcCopyToClipBoard;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.CopyToClipBoard;
  except end;
End;

Procedure pcCutToClipBoard;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.CutToClipBoard;
  except end;
End;

Procedure pcSetFieldText(FName:PChar;FValue:PChar);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.SetFieldText(String(FName),String(FValue));
  except end;
End;

Procedure pcPasteFromClipBoard(LayerNbr:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.PasteFromClipBoard(LayerNbr);
  except end;
End;

Function pcGetLayerNbr(LayerName:PChar):Integer;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.GetLayerNbr(string(LayerName));
  except end;
End;

Function pcFindFigureByName(FigName:PChar):Integer;stdcall;
var res:TFighandle;
Begin
  try
    if assigned(CadControl) then res := CadControl.FindFigureByName(String(FigName));
    Result := Integer(res);
  except end;
End;

Function pcLine(LayerNbr:Integer;x1:Double;y1:Double;x2:Double;y2:Double;w:Integer;s:Integer;c:Integer;row:Integer;selected:LongInt):Integer;stdcall;
var res:TFigHandle;
Begin
  try
    if assigned(CadControl) then res := CadControl.Line(LayerNbr,x1,y1,x2,y2,w,s,c,row,boolean(selected));
    Result := Integer(res);
  except end;
End;

Function pcVertex(LayerNbr:Integer;x:Double;y:Double;selected:LongInt):Integer;stdcall;
var res:TFigHandle;
Begin
  try
    if assigned(CadControl) then res := CadControl.Vertex(LayerNbr,x,y,boolean(selected));
    Result := Integer(res);
  except end;
End;

Function pcPolyLine(LayerNbr:Integer;var points:TDoublePoint;pCount:Integer;w:Integer;s:Integer;c:Integer;row:Integer;brs:Integer;brc:Integer;closed:LongInt;selected:LongInt):Integer;stdcall;
var res:TFigHandle;
Begin
  try
    if assigned(CadControl) then res := CadControl.PolyLine(LayerNbr,points,pCount,w,s,c,row,brs,brc,boolean(closed),boolean(selected));
    Result := Integer(res);
  except end;
End;

Function pcEllipse(LayerNbr:Integer;cx:Double;cy:Double;lenax:Double;lenbx:Double;angle:Double;w:Integer;s:Integer;c:Integer;brs:Integer;brc:Integer;selected:LongInt):Integer;stdcall;
var res:TFigHandle;
Begin
  try
    if assigned(CadControl) then res := CadControl.Ellipse(LayerNbr,cx,cy,lenax,lenbx,angle,w,s,c,brs,brc,boolean(selected));
    Result := Integer(res);
  except end;
End;

Function pcDrawCircle(LayerNbr:Integer;cx:Double;cy:Double;radius:Double;w:Integer;s:Integer;c:Integer;brs:Integer;brc:Integer;selected:LongInt):Integer;stdcall;
var res:TFigHandle;
Begin
  try
    if assigned(CadControl) then res := CadControl.DrawCircle(LayerNbr,cx,cy,radius,w,s,c,brs,brc,boolean(selected));
    Result := Integer(res);
  except end;
End;

Function pcArc(LayerNbr:Integer;cx:Double;cy:Double;radius:Double;a1:Double;a2:Double;w:Integer;s:Integer;c:Integer;brs:Integer;brc:Integer;ArcStyle:Integer;selected:LongInt):Integer;stdcall;
var res:TFigHandle;
Begin
  try
    if assigned(CadControl) then res := CadControl.Arc(LayerNbr,cx,cy,radius,a1,a2,w,s,c,brs,brc,ArcStyle,boolean(selected));
    Result := Integer(res);
  except end;
End;

Function pcElpArc(LayerNbr:Integer;cx:Double;cy:Double;lenax:Double;lenbx:Double;angle:Double;a1:Double;a2:Double;w:Integer;s:Integer;c:Integer;brs:Integer;brc:Integer;ArcStyle:Integer;selected:LongInt):Integer;stdcall;
var res:TFigHandle;
Begin
  try
    if assigned(CadControl) then res := CadControl.ElpArc(LayerNbr,cx,cy,lenax,lenbx,angle,a1,a2,w,s,c,brs,brc,ArcStyle,boolean(selected));
    Result := Integer(res);
  except end;
End;

Function pcRectangle(LayerNbr:Integer;x1:Double;y1:Double;x2:Double;y2:Double;w:Integer;s:Integer;c:Integer;brs:Integer;brc:Integer;selected:LongInt):Integer;stdcall;
var res:TFigHandle;
Begin
  try
    if assigned(CadControl) then res := CadControl.Rectangle(LayerNbr,x1,y1,x2,y2,w,s,c,brs,brc,boolean(selected));
    Result := Integer(res);
  except end;
End;

Function pcInsertBitmap(LayerNbr:Integer;x:Double;y:Double;fName:PChar;transparent:LongInt;selected:LongInt):Integer;stdcall;
var res:TFigHandle;
Begin
  try
    if assigned(CadControl) then res := CadControl.InsertBitmap(LayerNbr,x,y,string(fName),boolean(transparent),boolean(selected));
    Result := Integer(res);
  except end;
End;

Function pcInsertBitmapHandle(LayerNbr:Integer;x:Double;y:Double;xBitmap:Integer;transparent:LongInt;selected:LongInt):Integer;stdcall;
var res:TFigHandle;
Begin
  try
    if assigned(CadControl) then res := CadControl.InsertBitmapHandle(LayerNbr,x,y,HBitmap(xBitmap),boolean(transparent),boolean(selected));
    Result := Integer(res);
  except end;
End;

Function pcInsertWMF(LayerNbr:Integer;x:Double;y:Double;fName:PChar;selected:LongInt):Integer;stdcall;
var res:TFigHandle;
Begin
  try
    if assigned(CadControl) then res := CadControl.InsertWMF(LayerNbr,x,y,string(fName),boolean(selected));
    Result := Integer(res);
  except end;
End;

Function pcImportWMF(LayerNbr:Integer;fName:PChar;selected:LongInt):Integer;stdcall;
var res:TFigHandle;
Begin
  try
    if assigned(CadControl) then res := CadControl.ImportWMF(LayerNbr,string(fName),boolean(selected));
    Result := Integer(res);
  except end;
End;

Function pcImportDrawing(LayerNbr:Integer;x:Double;y:Double;fName:PChar;Selected:LongInt):Integer;stdcall;
var res:TFigHandle;
Begin
  try
    if assigned(CadControl) then res := CadControl.ImportDrawing(LayerNbr,x,y,String(fName),Boolean(Selected));
    Result := Integer(res);
  except end;
End;

Function pcTextOut(LayerNbr:Integer;x1:Double;y1:Double;angle:Double;height:Double;ratio:Double;atext:PChar;aFontName:PChar;FontCharset:Byte;Color:Integer;Selected:LongInt):Integer;stdcall;
var res:TFigHandle;
Begin
  try
    if assigned(CadControl) then res := CadControl.TextOut(LayerNbr,x1,y1,angle,height,ratio,string(atext),string(aFontName),FontCharset,Color,Boolean(Selected));
    Result := Integer(res);
  except end;
End;

Function pcGetFigureCustomStream(f:Integer;var size:Integer):Integer;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.GetFigureCustomStream(f,size);
  except end;
End;

Procedure pcSetFigureCustomStream(f:Integer;size:Integer;var data:Byte);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.SetFigureCustomStream(f,size,data);
  except end;
End;

Function pcGetCustomStream(var size:Integer):Integer;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.GetCustomStream(size);
  except end;
End;

Procedure pcSetCustomStream(size:Integer;var data:Byte);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.SetCustomStream(size,data);
  except end;
End;

Procedure pcPrintPreview;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.PrintPreview;
  except end;
End;

Function pcGetSlcPenStyle:Integer;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.GetSlcPenStyle;
  except end;
End;

Function pcGetSlcPenWidth:Integer;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.GetSlcPenWidth;
  except end;
End;

Function pcGetSlcPenColor:Integer;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.GetSlcPenColor;
  except end;
End;

Function pcGetSlcRowStyle:Integer;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.GetSlcRowStyle;
  except end;
End;

Function pcGetSlcBrushStyle:Integer;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.GetSlcBrushStyle;
  except end;
End;

Function pcGetSlcBrushColor:Integer;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.GetSlcBrushColor;
  except end;
End;

Function pcGetSlcFontName:PChar;stdcall;
var res:String;
Begin
  try
    if assigned(CadControl) then res := CadControl.GetSlcFontName;
    Result := PChar(res);
  except end;
End;

Function pcGetSlcFontBold:LongInt;stdcall;
var res:Boolean;
Begin
  try
    if assigned(CadControl) then res := CadControl.GetSlcFontBold;
    Result := LongInt(res);
  except end;
End;

Function pcGetSlcFontItalic:LongInt;stdcall;
var res:Boolean;
Begin
  try
    if assigned(CadControl) then res := CadControl.GetSlcFontItalic;
    Result := LongInt(res);
  except end;
End;

Function pcGetSlcFontStrike:LongInt;stdcall;
var res:Boolean;
Begin
  try
    if assigned(CadControl) then res := CadControl.GetSlcFontStrike;
    Result := LongInt(res);
  except end;
End;

Function pcGetSlcFontSize:Double;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.GetSlcFontSize;
  except end;
End;

Function pcGetSlcFontColor:Integer;stdcall;
var res:TColor;
Begin
  try
    if assigned(CadControl) then res := CadControl.GetSlcFontColor;
    Result := Integer(res);
  except end;
End;

Function pcGetSlcPolylineClosed:LongInt;stdcall;
var res:Boolean;
Begin
  try
    if assigned(CadControl) then res := CadControl.GetSlcPolylineClosed;
    Result := LongInt(res);
  except end;
End;

Function pcGetSlcImageTransparent:LongInt;stdcall;
var res:Boolean;
Begin
  try
    if assigned(CadControl) then res := CadControl.GetSlcImageTransparent;
    Result := LongInt(res);
  except end;
End;

Function pcGetSlcImageClipped:LongInt;stdcall;
var res:Boolean;
Begin
  try
    if assigned(CadControl) then res := CadControl.GetSlcImageClipped;
    Result := LongInt(res);
  except end;
End;

Function pcGetSlcArcStyle:Integer;stdcall;
var res:TArcStyle;
Begin
  try
    if assigned(CadControl) then res := CadControl.GetSlcArcStyle;
    Result := Integer(res);
  except end;
End;

Function pcGetSlcLineBounded:LongInt;stdcall;
var res:Boolean;
Begin
  try
    if assigned(CadControl) then res := CadControl.GetSlcLineBounded;
    Result := LongInt(res);
  except end;
End;

Function pcCountBlock(BlockName:PChar):Integer;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.CountBlock(String(BlockName));
  except end;
End;

Procedure pcExecuteTBCommand(CommandId:Integer);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.ExecuteTBCommand(CommandId);
  except end;
End;

Function pcGetVersion:Integer;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.GetVersion;
  except end;
End;

Function pcGetBuildNumber:Integer;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.GetBuildNumber;
  except end;
End;

Function pcBlockAsMetafile(bPath:PChar):Integer;stdcall;
Begin
  try
    if assigned(CadControl) then result := CadControl.BlockAsMetafile(String(bPath));
  except end;
End;

Procedure pcLockSelChange;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.LockSelChange;
  except end;
End;

Procedure pcUnLockSelChange;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.UnLockSelChange;
  except end;
End;

Procedure pcCenterPage;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.CenterPage;
  except end;
End;

Procedure pcAlignPageDown;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.AlignPageDown;
  except end;
End;

Procedure pcAlignPageUp;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.AlignPageUp;
  except end;
End;

Procedure pcStartBlink;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.StartBlink;
  except end;
End;

Procedure pcStopBlink;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.StopBlink;
  except end;
End;

Procedure pcResumeBlink;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.ResumeBlink;
  except end;
End;

Function pcIsBlinking:LongInt;stdcall;
var res:Boolean;
Begin
  try
    if assigned(CadControl) then res := CadControl.IsBlinking;
    Result := LongInt(res);
  except end;
End;

Procedure pcCalibrateLayerScale(var p1:TDoublePoint;var p2:TDoublePoint;cUnit:Byte);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.CalibrateLayerScale(p1,p2,cUnit);
  except end;
End;

Function pccNewDrawing:LongInt;stdcall;
var res:Boolean;
Begin
  try
    if assigned(CadControl) then res := CadControl.cNewDrawing;
    Result := LongInt(res);
  except end;
End;

Procedure pccOpenDrawing;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.cOpenDrawing;
  except end;
End;

Procedure pccOpenDrawingFile(fName:PChar);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.cOpenDrawingFile(String(fName));
  except end;
End;

Procedure pccSaveDrawing;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.cSaveDrawing;
  except end;
End;

Procedure pccSaveAsDrawing;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.cSaveAsDrawing;
  except end;
End;

Procedure pccPrintDrawing;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.cPrintDrawing;
  except end;
End;

Procedure pccPrintDrawingAsWmf;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.cPrintDrawingAsWmf;
  except end;
End;

Procedure pccTestPrinter;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.cTestPrinter;
  except end;
End;

Procedure pccExportAs;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.cExportAs;
  except end;
End;

Procedure pccImportDxf;stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.cImportDxf;
  except end;
End;

Procedure pcDoPopUp(x:Double;y:Double);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.DoPopUp(x,y);
  except end;
End;

Procedure pcExecuteCustomCommand(commandName:PChar);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.ExecuteCustomCommand(String(commandName));
  except end;
End;

Procedure pcExecuteVerbalCommand(Command:PChar);stdcall;
Begin
  try
    if assigned(CadControl) then CadControl.ExecuteVerbalCommand(String(Command));
  except end;
End;

Function pcExitApplication:LongInt;stdcall;
var res:Boolean;
Begin
  try
    if assigned(CadControl) then res := CadControl.ExitApplication;
    Result := LongInt(res);
  except end;
End;

Function pcIsUnNamed:LongInt;stdcall;
var res:Boolean;
Begin
  try
    if assigned(CadControl) then res := CadControl.IsUnNamed;
    Result := LongInt(res);
  except end;
End;

Procedure pcSetEventZoomIn(Adr:Integer);stdcall;
begin
  try
    @cbZoomIn := Pointer(Adr);
  except end
end;

Procedure pcSetEventZoomOut(Adr:Integer);stdcall;
begin
  try
    @cbZoomOut := Pointer(Adr);
  except end
end;

Procedure pcSetEventZoomArea(Adr:Integer);stdcall;
begin
  try
    @cbZoomArea := Pointer(Adr);
  except end
end;

Procedure pcSetEventZoomActualSize(Adr:Integer);stdcall;
begin
  try
    @cbZoomActualSize := Pointer(Adr);
  except end
end;

Procedure pcSetEventZoomFitToWindow(Adr:Integer);stdcall;
begin
  try
    @cbZoomFitToWindow := Pointer(Adr);
  except end
end;

Procedure pcSetEventSurfaceMove(Adr:Integer);stdcall;
begin
  try
    @cbSurfaceMove := Pointer(Adr);
  except end
end;

Procedure pcSetEventSurfaceMouseDown(Adr:Integer);stdcall;
begin
  try
    @cbSurfaceMouseDown := Pointer(Adr);
  except end
end;

Procedure pcSetEventSurfaceMouseUp(Adr:Integer);stdcall;
begin
  try
    @cbSurfaceMouseUp := Pointer(Adr);
  except end
end;

Procedure pcSetEventSurfaceLeave(Adr:Integer);stdcall;
begin
  try
    @cbSurfaceLeave := Pointer(Adr);
  except end
end;

Procedure pcSetEventSurfaceClick(Adr:Integer);stdcall;
begin
  try
    @cbSurfaceClick := Pointer(Adr);
  except end
end;

Procedure pcSetEventSurfaceDblClick(Adr:Integer);stdcall;
begin
  try
    @cbSurfaceDblClick := Pointer(Adr);
  except end
end;

Procedure pcSetEventSurfaceDragDrop(Adr:Integer);stdcall;
begin
  try
    @cbSurfaceDragDrop := Pointer(Adr);
  except end
end;

Procedure pcSetEventSurfaceDragOver(Adr:Integer);stdcall;
begin
  try
    @cbSurfaceDragOver := Pointer(Adr);
  except end
end;

Procedure pcSetEventScaleChanged(Adr:Integer);stdcall;
begin
  try
    @cbScaleChanged := Pointer(Adr);
  except end
end;

Procedure pcSetEventScrollValues(Adr:Integer);stdcall;
begin
  try
    @cbScrollValues := Pointer(Adr);
  except end
end;

Procedure pcSetEventCursorChange(Adr:Integer);stdcall;
begin
  try
    @cbCursorChange := Pointer(Adr);
  except end
end;

Procedure pcSetEventBeforePaint(Adr:Integer);stdcall;
begin
  try
    @cbBeforePaint := Pointer(Adr);
  except end
end;

Procedure pcSetEventCustomGuideTraceVB(Adr:Integer);stdcall;
begin
  try
    @cbCustomGuideTraceVB := Pointer(Adr);
  except end
end;

Procedure pcSetEventSelectionChange(Adr:Integer);stdcall;
begin
  try
    @cbSelectionChange := Pointer(Adr);
  except end
end;

Procedure pcSetEventObjectInserted(Adr:Integer);stdcall;
begin
  try
    @cbObjectInserted := Pointer(Adr);
  except end
end;

Procedure pcSetEventBeforeFigureInsert(Adr:Integer);stdcall;
begin
  try
    @cbBeforeFigureInsert := Pointer(Adr);
  except end
end;

Procedure pcSetEventFigureMoved(Adr:Integer);stdcall;
begin
  try
    @cbFigureMoved := Pointer(Adr);
  except end
end;

Procedure pcSetEventFigureModify(Adr:Integer);stdcall;
begin
  try
    @cbFigureModify := Pointer(Adr);
  except end
end;

Procedure pcSetEventFigureSelect(Adr:Integer);stdcall;
begin
  try
    @cbFigureSelect := Pointer(Adr);
  except end
end;

Procedure pcSetEventBeforeDelete(Adr:Integer);stdcall;
begin
  try
    @cbBeforeDelete := Pointer(Adr);
  except end
end;

Procedure pcSetEventAfterDelete(Adr:Integer);stdcall;
begin
  try
    @cbAfterDelete := Pointer(Adr);
  except end
end;

Procedure pcSetEventBeforeUndo(Adr:Integer);stdcall;
begin
  try
    @cbBeforeUndo := Pointer(Adr);
  except end
end;

Procedure pcSetEventAfterUndo(Adr:Integer);stdcall;
begin
  try
    @cbAfterUndo := Pointer(Adr);
  except end
end;

Procedure pcSetEventSurfacePaint(Adr:Integer);stdcall;
begin
  try
    @cbSurfacePaint := Pointer(Adr);
  except end
end;

Procedure pcSetEventMapScaleChanged(Adr:Integer);stdcall;
begin
  try
    @cbMapScaleChanged := Pointer(Adr);
  except end
end;

Procedure pcSetEventUserDraw(Adr:Integer);stdcall;
begin
  try
    @cbUserDraw := Pointer(Adr);
  except end
end;

Procedure pcSetEventUserHitTest(Adr:Integer);stdcall;
begin
  try
    @cbUserHitTest := Pointer(Adr);
  except end
end;

Procedure pcSetEventBeforeClear(Adr:Integer);stdcall;
begin
  try
    @cbBeforeClear := Pointer(Adr);
  except end
end;

Procedure pcSetEventObjectSaved(Adr:Integer);stdcall;
begin
  try
    @cbObjectSaved := Pointer(Adr);
  except end
end;

Procedure pcSetEventFigureEdit(Adr:Integer);stdcall;
begin
  try
    @cbFigureEdit := Pointer(Adr);
  except end
end;

Procedure pcSetEventCustomUndo(Adr:Integer);stdcall;
begin
  try
    @cbCustomUndo := Pointer(Adr);
  except end
end;

Procedure pcSetEventBeforeModify(Adr:Integer);stdcall;
begin
  try
    @cbBeforeModify := Pointer(Adr);
  except end
end;

Procedure pcSetEventBeforeMove(Adr:Integer);stdcall;
begin
  try
    @cbBeforeMove := Pointer(Adr);
  except end
end;

Procedure pcSetEventBeforeMoveAll(Adr:Integer);stdcall;
begin
  try
    @cbBeforeMoveAll := Pointer(Adr);
  except end
end;

Procedure pcSetEventAfterMoveAll(Adr:Integer);stdcall;
begin
  try
    @cbAfterMoveAll := Pointer(Adr);
  except end
end;

Procedure pcSetEventCalibrateLayer(Adr:Integer);stdcall;
begin
  try
    @cbCalibrateLayer := Pointer(Adr);
  except end
end;

Procedure pcSetEventCustomStreamUpdate(Adr:Integer);stdcall;
begin
  try
    @cbCustomStreamUpdate := Pointer(Adr);
  except end
end;

Procedure pcSetEventCustomStreamLoaded(Adr:Integer);stdcall;
begin
  try
    @cbCustomStreamLoaded := Pointer(Adr);
  except end
end;

Procedure pcSetEventDrawFigureInfo(Adr:Integer);stdcall;
begin
  try
    @cbDrawFigureInfo := Pointer(Adr);
  except end
end;

Procedure pcSetEventCustomCommand(Adr:Integer);stdcall;
begin
  try
    @cbCustomCommand := Pointer(Adr);
  except end
end;

Procedure pcSetEventPopMenuClicked(Adr:Integer);stdcall;
begin
  try
    @cbPopMenuClicked := Pointer(Adr);
  except end
end;

Procedure pcSetEventFigurePopMenuClicked(Adr:Integer);stdcall;
begin
  try
    @cbFigurePopMenuClicked := Pointer(Adr);
  except end
end;

Procedure pcSetEventFileNameChange(Adr:Integer);stdcall;
begin
  try
    @cbFileNameChange := Pointer(Adr);
  except end
end;

Procedure pcSetEventStatusMessages(Adr:Integer);stdcall;
begin
  try
    @cbStatusMessages := Pointer(Adr);
  except end
end;

Procedure pcSetEventGUIEvent(Adr:Integer);stdcall;
begin
  try
    @cbGUIEvent := Pointer(Adr);
  except end
end;

Procedure pcSetEventRefresh(Adr:Integer);stdcall;
begin
  try
    @cbRefresh := Pointer(Adr);
  except end
end;

Procedure pcSetEventTraceDraw(Adr:Integer);stdcall;
begin
  try
    @cbTraceDraw := Pointer(Adr);
  except end
end;

Procedure pcSetEventToolChanged(Adr:Integer);stdcall;
begin
  try
    @cbToolChanged := Pointer(Adr);
  except end
end;

Procedure pcSetEventMoveByArrows(Adr:Integer);stdcall;
begin
  try
    @cbMoveByArrows := Pointer(Adr);
  except end
end;

Procedure pcSetEventKeyStrokeVB(Adr:Integer);stdcall;
begin
  try
    @cbKeyStrokeVB := Pointer(Adr);
  except end
end;

Procedure pcSetEventDropFiles(Adr:Integer);stdcall;
begin
  try
    @cbDropFiles := Pointer(Adr);
  except end
end;


/////////////////////
exports
pcSetControlForPlugins,
pcGetPropDotsPerMil,
pcGetPropLocked,
pcSetPropLocked,
pcGetPropUpdated,
pcSetPropUpdated,
pcGetPropAutoRefresh,
pcSetPropAutoRefresh,
pcGetPropRulerVisible,
pcSetPropRulerVisible,
pcGetPropVerticalZero,
pcSetPropVerticalZero,
pcGetPropHorizontalZero,
pcSetPropHorizontalZero,
pcGetPropToolIdx,
pcGetPropToolInfo,
pcGetPropToolData,
pcGetPropDotsPerMilOrig,
pcSetPropDotsPerMilOrig,
pcGetPropActiveLayer,
pcSetPropActiveLayer,
pcGetPropZoomScale,
pcSetPropZoomScale,
pcGetPropGuidesVisible,
pcSetPropGuidesVisible,
pcGetPropBackGround,
pcSetPropBackGround,
pcGetPropPageColor,
pcSetPropPageColor,
pcGetPropGrids,
pcSetPropGrids,
pcGetPropGridType,
pcSetPropGridType,
pcGetPropCenterGuide,
pcSetPropCenterGuide,
pcGetPropPageGuide,
pcSetPropPageGuide,
pcGetPropDrawShadow,
pcSetPropDrawShadow,
pcGetPropDrawPageBorder,
pcSetPropDrawPageBorder,
pcGetPropGridColor,
pcSetPropGridColor,
pcGetPropGuideColor,
pcSetPropGuideColor,
pcGetPropRulerColor,
pcSetPropRulerColor,
pcGetPropGridStep,
pcSetPropGridStep,
pcGetPropWorkHeight,
pcSetPropWorkHeight,
pcGetPropWorkWidth,
pcSetPropWorkWidth,
pcGetPropPageLayout,
pcSetPropPageLayout,
pcGetPropPageOrient,
pcSetPropPageOrient,
pcGetPropGuideTrace,
pcSetPropGuideTrace,
pcGetPropSnapToGuides,
pcSetPropSnapToGuides,
pcGetPropSnapToNearPoint,
pcSetPropSnapToNearPoint,
pcGetPropSnapToGrids,
pcSetPropSnapToGrids,
pcGetPropScrollBars,
pcSetPropScrollBars,
pcGetPropRulerSystem,
pcSetPropRulerSystem,
pcGetPropDrawInCursor,
pcSetPropDrawInCursor,
pcGetPropRealScale,
pcSetPropRealScale,
pcGetPropMetricMode,
pcSetPropMetricMode,
pcGetPropAngularMode,
pcSetPropAngularMode,
pcGetPropWmfPrinting,
pcSetPropWmfPrinting,
pcGetPropDefaultPenColor,
pcSetPropDefaultPenColor,
pcGetPropDefaultBrushColor,
pcSetPropDefaultBrushColor,
pcGetPropDefaultPenWidth,
pcSetPropDefaultPenWidth,
pcGetPropDefaultPenStyle,
pcSetPropDefaultPenStyle,
pcGetPropDefaultBrushStyle,
pcSetPropDefaultBrushStyle,
pcGetPropDefaultRowStyle,
pcSetPropDefaultRowStyle,
pcGetPropDefaultTextHeight,
pcSetPropDefaultTextHeight,
pcGetPropDefaultTextRatio,
pcSetPropDefaultTextRatio,
pcGetPropDefaultPLineClosed,
pcSetPropDefaultPLineClosed,
pcGetPropDefaultArcStyle,
pcSetPropDefaultArcStyle,
pcGetPropLayerCount,
pcGetPropFigureCount,
pcGetPropSelectedCount,
pcGetPropMapScale,
pcSetPropMapScale,
pcGetPropRescaleToMap,
pcSetPropRescaleToMap,
pcGetPropAutoSelect,
pcSetPropAutoSelect,
pcGetPropKeyCommands,
pcSetPropKeyCommands,
pcGetPropRecordUndo,
pcSetPropRecordUndo,
pcGetPropUndoCount,
pcSetPropUndoCount,
pcGetPropDefaultPictureFolder,
pcSetPropDefaultPictureFolder,
pcGetPropSaveWithPreview,
pcSetPropSaveWithPreview,
pcGetPropRulerMode,
pcSetPropRulerMode,
pcGetPropZoomRect,
pcSetPropZoomRect,
pcGetPropRangeCheck,
pcSetPropRangeCheck,
pcGetPropAutoTilePrint,
pcSetPropAutoTilePrint,
pcGetPropFigureGuides,
pcSetPropFigureGuides,
pcGetPropNativeFill,
pcSetPropNativeFill,
pcGetPropActiveFile,
pcSetPropActiveFile,
pcGetPropCurrentColor,
pcSetPropCurrentColor,
pcGetPropCurrentStyle,
pcSetPropCurrentStyle,
pcGetPropCurrentString,
pcSetPropCurrentString,
pcGetPropCurrentFlag,
pcSetPropCurrentFlag,
pcGetPropCurrentFileName,
pcSetPropCurrentFileName,
pcGetPropCurrentValue,
pcSetPropCurrentValue,
pcGetPropFileExtension,
pcSetPropFileExtension,
pcGetPropMultiSelect,
pcSetPropMultiSelect,
pcGetPropOpenDialogTitle,
pcSetPropOpenDialogTitle,
pcGetPropOpenDialogFilter,
pcSetPropOpenDialogFilter,
pcGetPropSaveDialogTitle,
pcSetPropSaveDialogTitle,
pcGetPropSaveDialogFilter,
pcSetPropSaveDialogFilter,
pcGetPropAcceptFiles,
pcSetPropAcceptFiles,
pcGetPropMouseCommands,
pcSetPropMouseCommands,
pcGetPropPopStyle,
pcSetPropPopStyle,
pcGetPropCustomPopItems,
pcSetPropCustomPopItems,
pcGetPropMirrorStraight,
pcSetPropMirrorStraight,
pcGetPropDrawingPop,
pcSetPropDrawingPop,
pcPrintMessage,
pcRefresh,
pcClientToScreen,
pcScreenToClient,
pcSetCustomSurface,
pcDoResize,
pcSaveScroll,
pcRestoreScroll,
pcReLocate,
pcDoSurfaceMove,
pcDoSurfaceClick,
pcDoSurfaceDblClick,
pcDoSurfaceLeave,
pcDoSurfaceDragDrop,
pcDoSurfacePull,
pcDoSurfacePush,
pcDoSurfaceWheel,
pcDoKeyStroke,
pcCheckForGuideDrop,
pcDragStarted,
pcGetSelectionRect,
pcGetDrawingRect,
pcGetVisibleRect,
pcDeConvertXY,
pcDeConvertDim,
pcConvertXY,
pcConvertDim,
pcZoomArea,
pcFitToWindow,
pcActualSize,
pcZoomOut,
pcZoomIn,
pcClearGuides,
pcSetTool,
pcSetCursor,
pcSetDragCursor,
pcCheckGuideLine,
pcBeginHRulerDrag,
pcBeginVRulerDrag,
pcSurfaceWidth,
pcSurfaceHeight,
pcGetPageRect,
pcSetSurfaceMargin,
pcSetScrollPositions,
pcSetHScrollPosition,
pcSetVScrollPosition,
pcSetHScrollDelta,
pcSetVScrollDelta,
pcHSCBarPosition,
pcVSCBarPosition,
pcPointInHScroll,
pcPointInVScroll,
pcPointInHRuler,
pcPointInVRuler,
pcCenterLocation,
pcPointInView,
pcZoomDetailPoint,
pcHitTestModPointInt,
pcSimulateTrace,
pcSimulateDown,
pcSimulateUp,
pcSimulateRightClick,
pcSetSelectionHatch,
pcSetSelectionGradient,
pcSetSelectionTexture,
pcNewLayer,
pcDeleteLayer,
pcDeleteLayerWithNbr,
pcDeleteAllUserLayers,
pcUnDo,
pcReDo,
pcClearUndoList,
pcShowLayer,
pcHideLayer,
pcHideAllLayers,
pcGrayLayer,
pcExGrayLayer,
pcExHideLayer,
pcShowAllLayers,
pcMergeAllLayers,
pcMergeVisibleLayers,
pcGetLayerName,
pcGetLayerHandle,
pcGetLayerVisible,
pcGetLayerGrayed,
pcGetSelectedHandle,
pcFigureGetHandle,
pcFigureGetName,
pcFigureGetClass,
pcFigureGetPointCount,
pcFigureGetPoint,
pcFigureGetDCPoint,
pcFigureGetCenter,
pcFigureGetRect,
pcFigureGetRadius,
pcFigureGetFontName,
pcFigureGetFontBold,
pcFigureGetFontItalic,
pcFigureGetFontUnderline,
pcFigureGetFontStrike,
pcFigureGetFontSize,
pcFigureGetFontCharset,
pcFigureGetFontColor,
pcFigureGetPenColor,
pcFigureGetBrushColor,
pcFigureGetPenStyle,
pcFigureGetBrushStyle,
pcFigureGetRowStyle,
pcFigureGetPenWidth,
pcFigureGetInfo,
pcFigureGetAngle,
pcFigureGetLayerHandle,
pcFigureGetDiagonal,
pcFigureGetLockMove,
pcFigureGetLockModify,
pcFigureGetSelected,
pcFigureTestPoint,
pcFigureTestRect,
pcFigureGetRgnHandle,
pcFigureSelect,
pcFigureSelectAsRotate,
pcFigureDeSelect,
pcFigureEdit,
pcFigureMove,
pcFigureRotate,
pcFigureRotateByPoint,
pcFigureMirror,
pcFigureScale,
pcFigureScaleByPoint,
pcFigureSetFontName,
pcFigureSetFontBold,
pcFigureSetFontItalic,
pcFigureSetFontUnderline,
pcFigureSetFontStrike,
pcFigureSetFontSize,
pcFigureSetFontCharset,
pcFigureSetFontColor,
pcFigureSetPenColor,
pcFigureSetBrushColor,
pcFigureSetPenStyle,
pcFigureSetBrushStyle,
pcFigureSetRowStyle,
pcFigureSetPenWidth,
pcFigureSetPoint,
pcFigureSetInfo,
pcFigureSetAngle,
pcFigureSetLayerHandle,
pcFigureSetDiagonal,
pcFigureSetLockMove,
pcFigureSetLockModify,
pcFigureSetRgnHandle,
pcGetDCPoint,
pcGetDCLen,
pcFigureGrpGetFigureCount,
pcFigureGrpGetFigureHandle,
pcFigureGrpGetCombined,
pcFigureGrpSetCombined,
pcFigureGrpUngroup,
pcFigureBlockGetBlockname,
pcFigureGetJoin1,
pcFigureGetJoin2,
pcFigureSetJoin1,
pcFigureSetJoin2,
pcFigureGetClosed,
pcFigureSetClosed,
pcFigureGetControlPoint,
pcFigureSetControlPoints,
pcFigureGetSegmentType,
pcFigureSetSegmentType,
pcFigureInvertArcSegment,
pcFigureConvertPLBezier,
pcFigureConvertPLPolyline,
pcFigureGetElpALen,
pcFigureGetElpBLen,
pcFigureGetArcStyle,
pcFigureSetArcStyle,
pcFigureInvertArc,
pcFigureGetArcSAngle,
pcFigureGetArcFAngle,
pcFigureSetArcAngles,
pcFigureGetRichText,
pcFigureSetRichText,
pcFigureGetPictureName,
pcFigureGetTransparent,
pcFigureSetTransparent,
pcFigureFlipHorz,
pcFigureFlipVert,
pcFigureSkewBitmap,
pcFigureSaveBitmapToFile,
pcFigureLoadBitmapFromFile,
pcFigureGetText,
pcFigureSetText,
pcDrawUserFigureEvent,
pcPointInUserFigureEvent,
pcDraw,
pcDrawFigures,
pcDrawSelectedFigures,
pcDrawSelectionPoints,
pcDrawFigureGuides,
pcSelectAll,
pcDeselectAll,
pcInvertSelection,
pcGroupSelection,
pcUngroupSelection,
pcOrderSelection,
pcRemoveSelection,
pcRotateSelectionCenter,
pcRotateSelection,
pcMirrorSelection,
pcKnifeSelection,
pcCreateDimLinesOfSelection,
pcClearDimLinesOfSelection,
pcInterBreakSelection,
pcLockSelectionToMove,
pcLockSelectionToModify,
pcInvertArcsOfSelection,
pcArrangeArcStyleOfSelection,
pcCloseSelectedPolyline,
pcOpenSelectedPolyline,
pcSimplfySelectedPolyline,
pcNameSelection,
pcConvertPLToBezier,
pcConvertPLToPolyline,
pcFlipImagesOfSelection,
pcsetTransparentOfSelection,
pcScaleSelection,
pcScaleDrawing,
pcModifyFontName,
pcModifyFontBold,
pcModifyFontItalic,
pcModifyFontUnderline,
pcModifyFontStrike,
pcModifyFontSize,
pcModifyFontCharset,
pcModifyFontColor,
pcModifyPenColor,
pcModifyBrushColor,
pcModifyPenStyle,
pcModifyBrushStyle,
pcModifyRowStyle,
pcModifyPenWidth,
pcIsTextSelected,
pcGetSelectionBoundS,
pcGetDrawingBounds,
pcReDrawSelection,
pcReDrawSelectionPoints,
pcManualRefresh,
pcRefreshSelection,
pcReselect,
pcGetSurfaceBitmapHandle,
pcSelectByPoint,
pcDoMagicWand,
pcSelectByFigure,
pcSelectWithInArea,
pcSelectFigure,
pcDeSelectFigure,
pcMoveSelection,
pcMoveAll,
pcMoveAllSilent,
pcDuplicateSelection,
pcDuplicateSelectionAsBezier,
pcConvertSelectionToBezier,
pcArrayRectSelection,
pcArrayPolarSelection,
pcMakeSelectionBlock,
pcBoundSelectedLine,
pcBoundLineToFigures,
pcBoundLinePoint,
pcUnBoundLine,
pcMakeSelectedLinesPolyline,
pcWeldIntoPolyline,
pcOffSetSelection,
pcClipSelBitmapToSelFigure,
pcUnClipSelBitmap,
pcSaveToFile,
pcLoadFromFile,
pcInsertBlockwithFileName,
pcSetBlockInfo,
pcExportAsWmf,
pcExportAsDxf,
pcSelectionAsMetaFile,
pcDrawingAsMetaFile,
pcFigureAsMetaFile,
pcSelectionAsBmpHandle,
pcSaveAsBitmap,
pcCreatePreviewBitmapHandle,
pcDrawToDC,
pcStretchToDC,
pcPrintDrawing,
pcPrintDrawingAsWmf,
pcPrnStartJob,
pcPrnDoJob,
pcPrnEndJob,
pcPrnAbortJob,
pcPrintByTiling,
pcImportDXF,
pcClear,
pcCopyToClipBoard,
pcCutToClipBoard,
pcSetFieldText,
pcPasteFromClipBoard,
pcGetLayerNbr,
pcFindFigureByName,
pcLine,
pcVertex,
pcPolyLine,
pcEllipse,
pcDrawCircle,
pcArc,
pcElpArc,
pcRectangle,
pcInsertBitmap,
pcInsertBitmapHandle,
pcInsertWMF,
pcImportWMF,
pcImportDrawing,
pcTextOut,
pcGetFigureCustomStream,
pcSetFigureCustomStream,
pcGetCustomStream,
pcSetCustomStream,
pcPrintPreview,
pcGetSlcPenStyle,
pcGetSlcPenWidth,
pcGetSlcPenColor,
pcGetSlcRowStyle,
pcGetSlcBrushStyle,
pcGetSlcBrushColor,
pcGetSlcFontName,
pcGetSlcFontBold,
pcGetSlcFontItalic,
pcGetSlcFontStrike,
pcGetSlcFontSize,
pcGetSlcFontColor,
pcGetSlcPolylineClosed,
pcGetSlcImageTransparent,
pcGetSlcImageClipped,
pcGetSlcArcStyle,
pcGetSlcLineBounded,
pcCountBlock,
pcExecuteTBCommand,
pcGetVersion,
pcGetBuildNumber,
pcBlockAsMetafile,
pcLockSelChange,
pcUnLockSelChange,
pcCenterPage,
pcAlignPageDown,
pcAlignPageUp,
pcStartBlink,
pcStopBlink,
pcResumeBlink,
pcIsBlinking,
pcCalibrateLayerScale,
pccNewDrawing,
pccOpenDrawing,
pccOpenDrawingFile,
pccSaveDrawing,
pccSaveAsDrawing,
pccPrintDrawing,
pccPrintDrawingAsWmf,
pccTestPrinter,
pccExportAs,
pccImportDxf,
pcDoPopUp,
pcExecuteCustomCommand,
pcExecuteVerbalCommand,
pcExitApplication,
pcIsUnNamed,
pcSetEventZoomIn,
pcSetEventZoomOut,
pcSetEventZoomArea,
pcSetEventZoomActualSize,
pcSetEventZoomFitToWindow,
pcSetEventSurfaceMove,
pcSetEventSurfaceMouseDown,
pcSetEventSurfaceMouseUp,
pcSetEventSurfaceLeave,
pcSetEventSurfaceClick,
pcSetEventSurfaceDblClick,
pcSetEventSurfaceDragDrop,
pcSetEventSurfaceDragOver,
pcSetEventScaleChanged,
pcSetEventScrollValues,
pcSetEventCursorChange,
pcSetEventBeforePaint,
pcSetEventCustomGuideTraceVB,
pcSetEventSelectionChange,
pcSetEventObjectInserted,
pcSetEventBeforeFigureInsert,
pcSetEventFigureMoved,
pcSetEventFigureModify,
pcSetEventFigureSelect,
pcSetEventBeforeDelete,
pcSetEventAfterDelete,
pcSetEventBeforeUndo,
pcSetEventAfterUndo,
pcSetEventSurfacePaint,
pcSetEventMapScaleChanged,
pcSetEventUserDraw,
pcSetEventUserHitTest,
pcSetEventBeforeClear,
pcSetEventObjectSaved,
pcSetEventFigureEdit,
pcSetEventCustomUndo,
pcSetEventBeforeModify,
pcSetEventBeforeMove,
pcSetEventBeforeMoveAll,
pcSetEventAfterMoveAll,
pcSetEventCalibrateLayer,
pcSetEventCustomStreamUpdate,
pcSetEventCustomStreamLoaded,
pcSetEventDrawFigureInfo,
pcSetEventCustomCommand,
pcSetEventPopMenuClicked,
pcSetEventFigurePopMenuClicked,
pcSetEventFileNameChange,
pcSetEventStatusMessages,
pcSetEventGUIEvent,
pcSetEventRefresh,
pcSetEventTraceDraw,
pcSetEventToolChanged,
pcSetEventMoveByArrows,
pcSetEventKeyStrokeVB,
pcSetEventDropFiles;


end.
