AUTOCAD問題,打不開(20分)

  • 主题发起人 主题发起人 forjing_888
  • 开始时间 开始时间
F

forjing_888

Unregistered / Unconfirmed
GUEST, unregistred user!
AUTOCAD文件打開不了
procedure TForm1.Button1Click(Sender: TObject);
var
ACad: OleVariant;
begin
Acad := CreateOleObject('autocad.application');
Acad.Visible := true;
Acad.Documents.open('c:/111.dwg');
end;
 
看看下面的代码
procedure TForm1.Button1Click(Sender: TObject);
var
obj_Acad :OleVariant;
begin
try
obj_Acad:=GetActiveOleObject('AutoCAD.Application.15');
except
obj_Acad:=CreateOleObject('AutoCAD.Application.15');
end;
obj_Acad.Visible:=True;
obj_ACAD.Documents.Open('g://AutoCad/data/dwg/4.dwg');
end;

//for r14
procedure TForm1.Button1Click(Sender: TObject);
var
obj_Acad :OleVariant;
begin
try
obj_Acad:=GetActiveOleObject('AutoCAD.Application.14');
except
obj_Acad:=CreateOleObject('AutoCAD.Application.14');
end;
obj_Acad.Visible:=True;
obj_ACAD.ActiveDocument.Open('g://AutoCad/data/dwg/4.dwg');
end;
 
我已經解決了,把答案給你們
procedure Tmapform.BitBtn6Click(Sender: TObject);
var
acad,mspace:olevariant;
begin
try
Acad:= CreateOleObject('AutoCad.Application');
Acad.visible:= True;
Mspace := Acad.ActiveDocument.ModelSpace;
Acad.activedocment.open('c:/111.dwg')
end
 
andriy朋友有空來就交流一下
 
接受答案了.
 
andriy有空交流一下QQ54540657
 

Similar threads

后退
顶部