几何尺寸与公差论坛------致力于产品几何量公差标准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-06, 04:23 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】isemr90 wont ever return true, even on known ae files

isemr() won't ever return true, even on known ae files
isemr() won't ever return true, even on known ae files
hi.
i've just started using dwgdirect to access a file in order to see if it has the infamous "made with an educational version" stamp. i'm currently just modifying the singledoc example that comes with dwgdirect, but i intend to expand this app into an available (free) utility to scan entire directory structures recursively. i want there to be an easy utility to check an entire set of project folders for "tainted" files.
i'm using isemr(), a simple "is the databse made with an educational product" function that simply returns true or false; it's part of a oddbdatabase object.
i have checked a known "infected" ae file (it comes up in autocad2005 as educational), and isemr() says it's not ae.
i know that version 1.1 was to have fixed a bug where this function ran but was not actually implemented in the source code. as such, i kind of expected this function to work.
here's the admittedly simple code for those who'd like to see it. it occurs at the end of the view's "oninitialupdate" function, and is checked everytime i open a dwg file.
if (getdocument()->m_pdb->isemr())
{
messagebox("this file was created with an education version of autocad!");
}
any suggestions?
-matt
can you attach a file?
vladimir
yes, open/attach oddb seems ok...
yes, i'm using most all of the default code from the singledoc example project, which, after opening a dwg file, displays it in the app's window.
the "known infected" files that i'm opening do display properly (there are no xref's directly involved), so it does appear that the open/attach process is working fine.
-matt
here's the file opening /attach code (pretty staright forward):
-----------------------------------------------------------
try
{
m_pdb = theapp.readfile(lpszpathname, false, false);
}
catch(oderror& /*e*/)
{
}
catch(userbreak)
{
return false;
}
--------------------------------------------------------------
i mean - can you post to forum a file created in education version, that does not get recognized as such? (for which isemr() returns false)
vladimir
example educational file for testing isemr()
the following url will direct you to an example file that does print with the "educational stamp" warning when plotted (look at a preview). when opened in autocad 2005, you also receive two noticable warnings that you are working with an educational-created dwg file.
-matt
isemr() returns true for this file. what dd version are you using?
vladimir
dd version
apologies for the delay in my response: you had asked what version i was using since my isemr() returned false and yours returned true on the same file.
i'm using dwgdirect ver 2.02, as returned by the function versionstring(), though i thought it was the 2.20 (most recent as march2007).
-matt
2.02 is the same as 2.2
i tested isemr with 2.2, and, in any case, the coresponding code is trivial, and did not change for years. isemr is just a flag stored in dwg - there is no way to treat it somehow incorrectly
this is isemr code:
code:
bool oddbdatabase::isemr() const
{
return m_pimpl->m_educationalplotstamp != 0;
}
and this is how it is read:
code:
pdbimpl->m_educationalplotstamp = rdint32(); // educational plot stamp if != 0 (>=vac15)
vladimir
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
回复


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

高级搜索
显示模式

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

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

相似的主题
主题 主题发起者 论坛 回复 最后发表
【转帖】哪位高手指点一下下边lisp的怎么用 yang686526 数据库ObjectDBX 0 2009-04-28 12:13 PM
数字运算 yang686526 ObjectARX(AutoLISP) 0 2009-04-26 09:36 PM
哪位高手指点一下下边lisp的怎么用 yang686526 ObjectARX(AutoLISP) 0 2009-04-26 06:19 PM
【转帖】ado.net access操作方法 yang686526 ObjectARX(VB.NET/C#) 0 2009-04-19 09:37 PM


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


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