几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量  


返回   几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 » 仿射空间:CAX软件开发(三)二次开发与程序设计 » CAD二次开发 » AutoCAD二次开发 » DirectDWG
用户名
密码
注册 帮助 会员 日历 银行 搜索 今日新帖 标记论坛为已读


回复
 
主题工具 搜索本主题 显示模式
旧 2009-05-04, 03:29 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】access to proxy data

access to proxy data
access to proxy data
hello!
there are functions adreadproxydataxxx in odt to read proxy data from proxy objects. is there analog in directdwg?
how to read/write proxy data in directdwg?
best regards,
ivan obraztsov

using adreadproxydataxxx() in odt makes sence only if you know the data structure - if it's a known object for you.
in dwgdirect you can implement your own custom class and such objects will be loaded by dwgdirect not as oddbproxyobject or oddbproxyentity but as yourobject. see examplecustomobject.* in odamfcapp sample.
you need to implement methods dwginfields(), dwgoutfields(), dxfinfields(), dxfoutfields().
if your application is a viewer you need to implement worlddraw() to render your entity.
sergey slezkin

thank you.
but i could not implement this mechanism.
1. i create my own class. (copy the sample) change the dxf and app name in cpp-file.
2. call rxinit after initialization and rxuninit before uninitialization.
but i don抰 get me objects. i get the proxy objects.
what i have to do else?
best regards,
ivan obraztsov

you need to change rx class name too (first parameter of macro) it must be the same as the string under group code 2 in dxf file classes section:
0
class
1
examplecustobject - dxf name
2
examplecustobject - rx class name
3
odamfcapp - app name
sergey slezkin

i wonder, if i must use a derived class of od lib to be loaded automaticly.
can i read the data from the proxy entity directly? or, can i write the data out to another dwgfiler?
i tried to use my own dwgfiler and call the entity's dwgoutfields() method, but i failed with access deny. i think the odlib has too many internal mechanism, just like autocad. or, there is something i have done wrong.

custom objects must be derived from oddbobject or one of its inheritors.
custom entities must be derived from oddbentity or one of its inheritors.
there is no direct access to proxy data. dwgoutfields() should work with copy filer but not with file filer. but you may get a binary chunk as it is stored in dwg file and have to extract bit-coded values from it.
sergey slezkin
try
try and try by susheng
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
回复


主题工具 搜索本主题
搜索本主题:

高级搜索
显示模式

发帖规则
不可以发表新主题
不可以回复主题
不可以上传附件
不可以编辑您的帖子

vB 代码开启
[IMG]代码开启
HTML代码关闭

相似的主题
主题 主题发起者 论坛 回复 最后发表
【转帖】哪位高手指点一下下边lisp的怎么用 yang686526 数据库ObjectDBX 0 2009-04-28 12:13 PM
哪位高手指点一下下边lisp的怎么用 yang686526 ObjectARX(AutoLISP) 0 2009-04-26 06:19 PM
【转帖】请教dbgrid与data grid有什么不同-->leeyeafu转移 yang686526 数据库ObjectDBX 0 2009-04-19 08:02 PM
【转帖】data storage in sw docs yang686526 SolidWorks二次开发 0 2009-04-13 10:11 AM


所有的时间均为北京时间。 现在的时间是 08:55 AM.


于2004年创办,几何尺寸与公差论坛"致力于产品几何量公差标准GD&T | GPS研究/CAD设计/CAM加工/CMM测量"。免责声明:论坛严禁发布色情反动言论及有关违反国家法律法规内容!情节严重者提供其IP,并配合相关部门进行严厉查处,若內容有涉及侵权,请立即联系我们QQ:44671734。注:此论坛须管理员验证方可发帖。
沪ICP备06057009号-2
更多