本帖最后由 _rocky 于 2016-1-11 11:51 编辑
DWGdirect ActiveX 3.3.0 下载地址见附件
1. DWGdirect ActiveX 3.3.0 是什么?
DWGdirect ActiveX 3.3.0 是COM/OLE组件,通过该组件能对dwg文件进行一系列操作,类似于Autocd.Application和ObjectDBXcom组件,但功能要更强大
2. DWGdirect ActiveX 3.3.0 如何创建像:
(setq OdaApp (Vlax-Get-Or-Create-Object "TeighaX.OdaHostApp" ))
#<VLA-OBJECT IOdaHostApp3 079be374>
(Vlax-dump-object OdaApp T)
; IOdaHostApp3: IOdaHostApp3 interface
;特性值:
; Application (RO) = #<VLA-OBJECT IAcadApplication 079be394>
; AuditInfo (RO) = 发生意外。
; Console = nil
; OpenDbPartially = 0
; PagingController = nil
;支持的方法:
; AuditDatabase (2)
; BrowseForOpenFileName (4)
; OriginalFileType (2)
; PageObjects (1)
; Recover (2)
T
(setq OdaX (Vlax-Get-Or-Create-Object "OdaX.OdaOle" ))
#<VLA-OBJECT IOdaOle 079d6ba0>
(Vlax-dump-object OdaX T)
; IOdaOle: TeighaX Interface for an additional Ole functionality
;特性值:
; Application (RO) = 发生意外。
; Document (RO) = nil
; Handle (RO) = "0"
; HasExtensionDictionary (RO) = TeighaX: Null object Id
; Height = TeighaX: Null object Id
; Hyperlinks (RO) = 发生意外。
; InsertionPoint = TeighaX: Null object Id
; Layer = TeighaX: Null object Id
; Linetype = TeighaX: Null object Id
; LinetypeScale = TeighaX: Null object Id
; Lineweight = TeighaX: Null object Id
; LinkName (RO) = TeighaX: Null object Id
; LinkPath (RO) = TeighaX: Null object Id
; LockAspectRatio = TeighaX: Null object Id
; Material = TeighaX: Null object Id
; ObjectID (RO) = 0
; ObjectName (RO) = TeighaX: Null object Id
; OleItemType = TeighaX: Null object Id
; OlePlotQuality = TeighaX: Null object Id
; OleSourceApp = TeighaX: Null object Id
; OwnerID (RO) = TeighaX: Null object Id
; PlotStyleName = TeighaX: Null object Id
; Rotation = TeighaX: Null object Id
; ScaleHeight = TeighaX: Null object Id
; ScaleWidth = TeighaX: Null object Id
; TrueColor = TeighaX: Null object Id
; Visible = TeighaX: Null object Id
; Width = TeighaX: Null object Id
;支持的方法:
; ArrayPolar (3)
; ArrayRectangular (6)
; Copy ()
; Delete ()
; GetBoundingBox (2)
; GetExtensionDictionary ()
; GetXData (3)
; Highlight (1)
; IntersectWith (2)
; Mirror (2)
; Mirror3D (3)
; Move (2)
; Rotate (2)
; Rotate3D (3)
; ScaleEntity (2)
; SetXData (2)
; TransformBy (1)
; Update ()
T
3. 源代码- (setq OdaHostApp (Vlax-Get-Or-Create-Object "TeighaX.OdaHostApp" ))
- (setq AcadApp (vla-get-Application OdaHostApp ));获取Application对象
- (setq Documents (vla-get-Documents AcadApp));获取Documents对象
- (setq Document (vla-Open Documents "*.DWG" ));获取Document对象
- (setq Database (vla-get-Database Document ));获取Database对象
- (setq Blocks (vla-get-Blocks Database ));获取BlockTable对象
- (setq *ModleSpace* (vla-get-ModelSpace Document));获取ModleSpace对象
- (setq *PaperSpace* (vla-get-PaperSpace Document));获取PaperSpace对象
- (setq Layout (vla-get-Layouts Document));获取Layout对象
- (vlax-for Block Blocks
- ;遍历BlockTable
- )
复制代码 等等,还有更多功能等待大家研究
|