几何尺寸与公差论坛

 找回密码
 注册
查看: 641|回复: 0

【转帖】undo objects in the api

[复制链接]
发表于 2009-4-12 22:43:27 | 显示全部楼层 |阅读模式
"undo objects" in the api
has anyone developed an addin which creates something new in the sw part and adds it to the undo queue so that it's undo-able by the user?
there's some documentation about undo objects, but i'm not quite sure i understand how it works.
i'm using sw2009 and my addin is developed in c++, but any examples in that language would be best, but i won't be choosy.
pete rimkus
cnc software, inc.
(pete.rimkus@mastercam.com)
hi,
swmodeldocext.startrecordingundoobject
'do the task
swmodeldocext.finishrecordingundoobject ("api undo")
scott,
thanks, but isn't there more than that? i've put that code around some simple isketchmanager::createline() calls and undo is not available afterwards.
the connection between these 2 functions and imodeldocextension::setapiundoobject() is not clear to me...the "startrecording" and "endrecording" functions dont explicitly require that the undoobject or it's handler be defined, but since i have not done that, maybe that's why undo isn't available to me. when i debug finishrecordingundoobject() returns a result of s_false.
if this is the case, exactly what should my handler look like?
if this is not the case, what else might i be doing wrong?
---edited----
more to the point, what would a c++ handler look like?
pete rimkus
cnc software, inc.
(pete.rimkus@mastercam.com)
edited: 11/24/2008 at 02:40 pm by pete rimkus
quick
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|小黑屋|几何尺寸与公差论坛

GMT+8, 2024-12-23 18:19 , Processed in 0.035204 second(s), 19 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

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