Var Acad : AcadApplication;
Var AcadDoc : AcadDocument;
Var sset :AcadSelectionSet;
Var Zpnt1,Zpnt2: OleVariant ;
Var dd,ff: OleVariant;
Var FilterType: oleVariant;
Var FilterData: oleVariant;
...
procedure TForm1.WMF_SAVEClick(Sender: TObject);
begin
Acad:=GetActiveOleObject('AutoCAD.Application') as AcadApplication;
AcadDoc:= Acad.ActiveDocument as AcadDocument;
////////////////////////////////////////////////
/// объявил координаты точек
Zpnt1:= VarArrayCreate([0, 2], varDouble);
Zpnt2:= VarArrayCreate([0, 2], varDouble);
dd:= VarArrayCreate([0,1], varinteger);
ff:= VarArrayCreate([0,1], varinteger);
dd[0]:=70;
ff[0]:=1;
// Границы выдиленной части чертежа для сохранения
Zpnt1[0]:=MN_X;
Zpnt1[1]:=MN_Y;
Zpnt2[0]:=MA_X;
Zpnt2[1]:=MA_Y;
////////////////////////////////////////////////
////////////////////////////////////////////////
// зумируем по заданной границе
acad.Application.ZoomWindow(Zpnt1,Zpnt2);
acad.Application.Update;
// выделяем объекты в заданных координатах
FilterType:=VarArrayCreate([0,0],VT_I2);
FilterData:=VarArrayCreate([0,0],VT_Variant);
FilterType[0]:=8;
FilterData[0]:='*';
// выделенный набор сохраняем
sset:=acad.ActiveDocument.SelectionSets.Add('7FOR_WMF');
sset.Select(5,Zpnt1,Zpnt2,FilterType,FilterData);
beep;
acad.ActiveDocument.Export(ExtractFilePath(Application.ExeName)+'\TEMP\OZU_RAM','wmf', sset);
sset.Delete;
////////////////////////////////////////////////
end;