明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1731|回复: 2

DWGdirect ActiveX 3.3.0

[复制链接]
发表于 2016-1-9 11:00:25 | 显示全部楼层 |阅读模式
本帖最后由 _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. 源代码
  1. (setq OdaHostApp (Vlax-Get-Or-Create-Object "TeighaX.OdaHostApp" ))
  2. (setq AcadApp (vla-get-Application OdaHostApp ));获取Application对象
  3. (setq Documents (vla-get-Documents AcadApp));获取Documents对象
  4. (setq Document (vla-Open Documents "*.DWG" ));获取Document对象
  5. (setq Database (vla-get-Database Document ));获取Database对象
  6. (setq Blocks (vla-get-Blocks Database ));获取BlockTable对象
  7. (setq *ModleSpace* (vla-get-ModelSpace Document));获取ModleSpace对象
  8. (setq *PaperSpace* (vla-get-PaperSpace Document));获取PaperSpace对象
  9. (setq Layout (vla-get-Layouts Document));获取Layout对象
  1. (vlax-for Block Blocks
  2. ;遍历BlockTable
复制代码
等等,还有更多功能等待大家研究















本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

x

点评

Kye
大侠 能发个简单的例子学习下吧?谢谢  发表于 2016-1-9 23:21
发表于 2016-1-9 18:56:43 | 显示全部楼层
 楼主| 发表于 2016-1-9 19:13:25 | 显示全部楼层
zzyong00 发表于 2016-1-9 18:56
https://www.baidu.com/s?word=DWGdirect+ActiveX+3.3.0+%E4%B8%8B%E8%BD%BD%E5%9C%B0%E5%9D%80&ie=utf-8&t ...

建议你去百度上下载,如果找不到了,可以考虑在我这里下载
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-11-25 09:38 , Processed in 0.170468 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表