Delphi用GetEntity方法取图元时发生错误,请问高手怎么弄呢?
Delphi用GetEntity方法取图元时发生错误,请问高手怎么弄呢?var
AcadApp: OleVariant;
AcadDoc: OleVariant;
AcadObj: AcadEntity;
picpnt:Olevariant;
begin
try
AcadApp:=GetActiveOleObject('AutoCAD.Application');
except
AcadApp:=CreateOleObject('AutoCad.Application');
end;
AcadDoc := AcadApp.ActiveDocument;
acaddoc.utility.getentity (acadobj,picpnt,'选择1个图元:');
acadobj.color:=5;
end;
我这样编写为会报错,说发生意外,请问高手怎么解决呢?
页:
[1]