ObjectARX学习笔记

一、AutoCAD APIs支持

1,ObjectARX
2,.NET Managed API
3,COM Automation (VB, Java, Delphi, etc.)
4,AutoLISP

二次开发编程主要采用ObjectARX)和RealDWG,其中ObjectARX是免费的,RealDWG是收费的。

(http://www.autodesk.com/objectarx, 

  http://usa.autodesk.com/adsk/servlet/index?siteID=123112&id=770257)


API架构




二、ObjectARX

1,ObjectARX是什么?

     AutoCAD Runtime eXtension

    • A DLL plug-in model
    • A set of Object Oriented C++ libraries
    • A framework

2,ObjectARX能做什么?

  • Modify and extend the drawing database
    • Create/modify/erase objects
    • Create new types of objects
  • Modify AutoCAD’s user interface
    • Commands
    • Toolbars/dialogs
    • Properties Window
    • Design Center
    • Display system
  • Monitor/Modify AutoCAD’s standard behavior
    • Event notifications
    • Input point acquisition
3,.ARX = .DLL + 2 exported functions

  • acrxEntryPoint
  • acrxGetApiVersion

三、ObjectARX架构


AcDbDatabase 结构体系




Block Table:

三个默认的记录:*MODEL_SPACE, *PAPER_SPACE, *PAPER_SPACE0

实体只有添加到上述三个记录中才能在AutoCAD中显示。


AcRxObject  (在 rxobject.h 中定义)

  • cast down-cast pointer safely
  • isA get class descriptor
  • isKindOf is object derived from?
AcDbEntity *ent;
if (ent->isKindOf( AcDbLine::desc()))
{
    AcDbLine *line = AcDbLine::cast(ent);
    //do something with line->startPoint()...
}


四、AutoCAD图形数据库



m

  • 0
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值