Delphi调用AutoCAD DWF Viewer[转]

这是一个利用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. 
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
AutoCAD_TLB.pas文件下载 unit AutoCAD_TLB; // ************************************************************************ // // WARNING // ------- // The types declared in this file were generated from data read from a // Type Library. If this type library is explicitly or indirectly (via // another type library referring to this type library) re-imported, or the // 'Refresh' command of the Type Library Editor activated while editing the // Type Library, the contents of this file will be regenerated and all // manual modifications will be lost. // ************************************************************************ // // PASTLWTR : $Revision: 1.130 $ // File generated on 2006-8-11 16:08:04 from Type Library described below. // ************************************************************************ // // Type Lib: C:\Program Files\AutoCAD 2002\acad.tlb (1) // LIBID: {C094C1E2-57C6-11D2-85E3-080009A0C626} // LCID: 0 // Helpfile: C:\Program Files\AutoCAD 2002\ACADAUTO.CHM // DepndLst: // (1) v2.0 stdole, (C:\WINDOWS\System32\StdOle2.Tlb) // (2) v4.0 StdVCL, (C:\WINDOWS\System32\stdvcl40.dll) // Errors: // Hint: Parameter 'Type' of IAcadBlock.AddLeader changed to 'Type_' // Hint: Member 'Type' of 'IAcadPolygonMesh' changed to 'Type_' // Hint: Parameter 'Type' of IAcadPolygonMesh.Type changed to 'Type_' // Hint: Parameter 'Type' of IAcadPolygonMesh.Type changed to 'Type_' // Hint: Member 'Type' of 'IAcad3DPolyline' changed to 'Type_' // Hint: Parameter 'Type' of IAcad3DPolyline.Type changed to 'Type_' // Hint: Parameter 'Type' of IAcad3DPolyline.Type changed to 'Type_' // Hint: Parameter 'Object' of IAcad3DSolid.CheckInterference changed to 'Object_' // Hint: Parameter 'Object' of IAcadRegion.Boolean changed to 'Object_' // Hint: Parameter 'Type' of IAcadDimension.VerticalTextPosition changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimension.VerticalTextPosition changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimAligned.FractionFormat changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimAligned.FractionFormat changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimAligned.HorizontalTextPosition changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimAligned.HorizontalTextPosition changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimAligned.LinearScaleFactor changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimAligned.LinearScaleFactor changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimAligned.Arrowhead1Type changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimAligned.Arrowhead1Type changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimAligned.Arrowhead2Type changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimAligned.Arrowhead2Type changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimAngular.DimensionLineColor changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimAngular.DimensionLineColor changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimAngular.ExtensionLineColor changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimAngular.ExtensionLineColor changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimAngular.HorizontalTextPosition changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimAngular.HorizontalTextPosition changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimAngular.Arrowhead1Type changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimAngular.Arrowhead1Type changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimAngular.Arrowhead2Type changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimAngular.Arrowhead2Type changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimDiametric.DimensionLineColor changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimDiametric.DimensionLineColor changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimDiametric.FractionFormat changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimDiametric.FractionFormat changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimDiametric.LinearScaleFactor changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimDiametric.LinearScaleFactor changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimDiametric.CenterType changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimDiametric.CenterType changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimDiametric.CenterMarkSize changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimDiametric.CenterMarkSize changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimDiametric.Arrowhead1Type changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimDiametric.Arrowhead1Type changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimDiametric.Arrowhead2Type changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimDiametric.Arrowhead2Type changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimRotated.DimensionLineColor changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimRotated.DimensionLineColor changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimRotated.ExtensionLineColor changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimRotated.ExtensionLineColor changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimRotated.FractionFormat changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimRotated.FractionFormat changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimRotated.HorizontalTextPosition changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimRotated.HorizontalTextPosition changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimRotated.LinearScaleFactor changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimRotated.LinearScaleFactor changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimRotated.Arrowhead1Type changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimRotated.Arrowhead1Type changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimRotated.Arrowhead2Type changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimRotated.Arrowhead2Type changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimOrdinate.ExtensionLineColor changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimOrdinate.ExtensionLineColor changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimOrdinate.FractionFormat changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimOrdinate.FractionFormat changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimOrdinate.LinearScaleFactor changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimOrdinate.LinearScaleFactor changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimRadial.CenterType changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimRadial.CenterType changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimRadial.CenterMarkSize changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimRadial.CenterMarkSize changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimRadial.DimensionLineColor changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimRadial.DimensionLineColor changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimRadial.FractionFormat changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimRadial.FractionFormat changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimRadial.LinearScaleFactor changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimRadial.LinearScaleFactor changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimRadial.ArrowheadType changed to 'Type_' // Hint: Parameter 'Type' of IAcadDimRadial.ArrowheadType changed to 'Type_' // Hint: Member 'Type' of 'IAcadLeader' changed to 'Type_' // Hint: Parameter 'Type' of IAcadLeader.Type changed to 'Type_' // Hint: Parameter 'Type' of IAcadLeader.Type changed to 'Type_' // Hint: Parameter 'Type' of IAcadLeader.ArrowheadType changed to 'Type_' // Hint: Parameter 'Type' of IAcadLeader.ArrowheadType changed to 'Type_' // Hint: Parameter 'Type' of IAcadLeader.DimensionLineColor changed to 'Type_' // Hint: Parameter 'Type' of IAcadLeader.DimensionLineColor changed to 'Type_' // Hint: Parameter 'Type' of IAcadLeader.VerticalTextPosition changed to 'Type_' // Hint: Parameter 'Type' of IAcadLeader.VerticalTextPosition changed to 'Type_' // Hint: Member 'Type' of 'IAcadPolyline' changed to 'Type_' // Hint: Parameter 'Type' of IAcadPolyline.Type changed to 'Type_' // Hint: Parameter 'Type' of IAcadPolyline.Type changed to 'Type_' // Hint: Parameter 'Type' of IAcadTolerance.DimensionLineColor changed to 'Type_' // Hint: Parameter 'Type' of IAcadTolerance.DimensionLineColor changed to 'Type_' // Hint: Parameter 'Type' of IAcadDim3PointAngular.DimensionLineColor changed to 'Type_' // Hint: Parameter 'Type' of IAcadDim3PointAngular.DimensionLineColor changed to 'Type_' // Hint: Parameter 'Type' of IAcadDim3PointAngular.ExtensionLineColor changed to 'Type_' // Hint: Parameter 'Type' of IAcadDim3PointAngular.ExtensionLineColor changed to 'Type_' // Hint: Parameter 'Type' of IAcadDim3PointAngular.HorizontalTextPosition changed to 'Type_' // Hint: Parameter 'Type' of IAcadDim3PointAngular.HorizontalTextPosition changed to 'Type_' // Hint: Parameter 'Type' of IAcadDim3PointAngular.Arrowhead1Type changed to 'Type_' // Hint: Parameter 'Type' of IAcadDim3PointAngular.Arrowhead1Type changed to 'Type_' // Hint: Parameter 'Type' of IAcadDim3PointAngular.Arrowhead2Type changed to 'Type_' // Hint: Parameter 'Type' of IAcadDim3PointAngular.Arrowhead2Type changed to 'Type_' // Hint: Parameter 'Object' of IAcadDictionary.GetName changed to 'Object_' // Hint: Parameter 'Type' of IAcadApplication.Zoom changed to 'Type_' // Hint: Symbol 'System' renamed to 'System_' // Hint: Member 'Type' of 'IAcadMenuGroup' changed to 'Type_' // Hint: Parameter 'Label' of IAcadPopupMenu.AddMenuItem changed to 'Label_' // Hint: Parameter 'Label' of IAcadPopupMenu.AddSubMenu changed to 'Label_' // Hint: Member 'Label' of 'IAcadPopupMenuItem' changed to 'Label_' // Hint: Member 'Type' of 'IAcadPopupMenuItem' changed to 'Type_' // Hint: Member 'Type' of 'IAcadToolbarItem' changed to 'Type_' // Hint: Parameter 'Unit' of IAcadUtility.AngleToReal changed to 'Unit_' // Hint: Parameter 'Unit' of IAcadUtility.AngleToString changed to 'Unit_' // Hint: Parameter 'Unit' of IAcadUtility.DistanceToReal changed to 'Unit_' // Hint: Parameter 'Unit' of IAcadUtility.RealToString changed to 'Unit_' // Hint: Parameter 'Type' of IAcadUtility.CreateTypedArray changed to 'Type_' // Hint: Parameter 'Object' of IAcadUtility.GetEntity changed to 'Object_' // Hint: Parameter 'Object' of IAcadUtility.GetSubEntity changed to 'Object_' // Hint: Parameter 'Object' of _DAcadDocumentEvents.ObjectAdded changed to 'Object_' // Hint: Parameter 'Object' of _DAcadDocumentEvents.ObjectModified changed to 'Object_' // ************************************************************************ // // *************************************************************************// // NOTE:
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值