Delphi调用AutoCAD DWF Viewer[转]

本文介绍了一个使用Delphi和AutoCAD类型库调用DWFViewer组件来浏览DWF文件的例子。通过导入C:/Program Files/Autodesk/Autodesk DWF Viewer/AdView.dll类型库,展示了如何在Delphi应用程序中实现对DWF文件的基本操作。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

这是一个利用AutoCAD类型库调用AutoCAD DWF Viewer的例子。能够浏览DWF 文件。
还是上传不了。
只好贴上。
unit Unit1;
{ Delphi利用AutoCAD类型库调用DWF Viewer 的例子 }
{ 作者:钏裕民 2006年6月10日于昆明 }
{ Email : chuanyumin@126.com.cn }
{ qq : 670856630 }
{ 说明: }
{ 实际上AutoCAD中有许多类型库,不仅是扩展名是.tlb的是类型库 }
{ 许多AutoCAD安装目录下的.dll文件也是类型库,也可导入,可在编程中利用 }
{ 这里,仅演示C:/Program Files/Autodesk/Autodesk DWF Viewer/AdView.dll }
{ 导入类型库后的利用,其它仍在摸索。 }

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, OleCtrls, StdCtrls, ExpressViewerDll_TLB;

type
TForm1 = class(TForm)
CExpressViewerControl1: TCExpressViewerControl;
Button1: TButton;
Label1: TLabel;
Label2: TLabel;
Button2: TButton;
procedure MouseDBClick(ASender: TObject; nX, nY: Integer;
const pHandled: IDispatch);
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.MouseDBClick(ASender: TObject; nX, nY: Integer;
const pHandled: IDispatch);
begin
CExpressViewerControl1.BrowseProperties;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
Close;
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
CExpressViewerControl1.ExecuteCommand('NEXT');
end;

end. 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值