几何尺寸与公差论坛------致力于产品几何量公差标准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, 04:35 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】bad data generated by odgetsatfromproxy90

bad data generated by odgetsatfromproxy()
bad data generated by odgetsatfromproxy()
i'm trying to grab the sat data from a proxy entity of type "acadpart" and with the attached .dwg file, what i'm getting for sat data is gibberish. the sat file is attached (as a .txt). maybe it's binary sat (sab?) data? maybe the dwg file is from 2006? any ideas?
here's what my code in exprotocolextension() looks like:
void dump(oddbentity* pent, std(ostream) & os) const
{
// this will dump proxy entity graphics
//oddbentity_dumper::dump(pent, os);
dumpcommondata(pent, os);
if(pent->visibility() == oddb::kvisible)
{
// if the entity is of type acadpart, then dump the associated sat file
oddbproxyentityptr pproxy = pent;
odstring satstring;
if (pproxy->originalclassname() == "acadpart" &&
odgetsatfromproxy(pproxy, satstring))
{
odstring sn = buildacisfilename(); // my function to define a filename
odwrfilebuf wf(sn);
wf.putbytes(satstring.c_str(), strlen(satstring.c_str())*sizeof(char));
}
}
}
any help/advice would be appreciated
pete rimkus
cnc software
attached files
did you use toolkit v13 ?
i cannot reproduce it
try to find adpart entity by handle in odamfcapp and call 'save sat info to' dialog. it show you attached sat to adpart entity.
i thought i was using 1.13 but i'm not - i'm still at 1.12.4.
i'll build with 1.13 and i'll let you know what i find.
thanks,
pete

i verified that this does indeed work correctly in 1.13.02, but only in debug configuration. my app and all the release configurations of the odreadex c++ sample project will hang when reading the file i sent with the initial post. i've attached it again in case you need it
thanks in advance.
pete rimkus
cnc software, inc.
attached files (652.8 kb, 6 views)

last edited by pete rimkus; 28th june 2005 at 06:08 amfff">.
bump........
pete,
alex is working on it. we'll reply then the problem is solved.
sergey slezkin

pete,
problem is solved. fix will be available in next release/update.
sincerely yours,
george udov
thanks guys!
george & sergey,
i finally got a chance to look at this in 1.13.05 and it does indeed work for the file i sent, and for a couple others which had failed in the same place.
now i'm trying to attach another file which still fails. i get what appears to be a truncated sat file string. it looks good for @ 140kb, but then abruptly ends. the 'upload' is failing so i'll email it to support.
thanks,
pete rimkus
cnc software, inc.
last edited by pete rimkus; 27th september 2005 at 09:41 amfff">.
hi,
i have got files from you, but i cannot reproduce your problem. i have tested debug and release 1.13.* i use mfcapp to load files and got sat info from adpartproxy... for example, i have found two adpart in assy valve.dwg, in u1 and u4 blocks, both return valid sat (u4 has clear sat). also i have used readex (rel&debug) to read your files - it is not hang... please give me more information about problem...
alex,
it is indeed extracting sat data for the solid on *u1, but that data is incomplete.
i added the following...
odstring sn = "c:\\test.sat";
odwrfilebuf wf(sn);
wf.putbytes(satstring.c_str(), strlen(satstring.c_str())*sizeof(char));
to exprotocolextension.cpp's oddbproxyentity_dumper::dump() function after the 'if' test and and the resultant .sat file is incomplete. can you try this?
pete
also: i've attached the resultant sat file. there's an error generated when i try to attach the dwg file
attached files (43.5 kb, 6 views)

last edited by pete rimkus; 30th september 2005 at 09:12 amfff">.
hi,
i have found bug in our mathematics (conversion from 20800 to v4). i'll try to fix it.
ps:
there is no bug here when you convert sat to >= 500.
alex,
thanks.
based upon your last sentence, is there a way for me to work around the problem and get good sat data? i don't see where i have any control over what sat version will be returned from odgetsatfromproxy(). maybe you know a secret?
pete
toolkit_export bool odgetsatfromproxy(const oddbproxyentityptr& adpart, odstring& sat);
toolkit_export bool odgetsatfromproxy(const oddbproxyentityptr& adpart, odmodelergeometryptr& pmodelergeometry);
you can use second variant, mfcapp used it in constructor of cacissavedialog class.
ok - i'll give that a shot.
thanks
pete
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
回复


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

高级搜索
显示模式

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

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

相似的主题
主题 主题发起者 论坛 回复 最后发表
【转帖】acis data garbled yang686526 DirectDWG 0 2009-05-04 03:37 PM
【转帖】accessing autocad map object data yang686526 DirectDWG 0 2009-05-04 03:32 PM
【转帖】哪位高手指点一下下边lisp的怎么用 yang686526 数据库ObjectDBX 0 2009-04-28 12:13 PM
哪位高手指点一下下边lisp的怎么用 yang686526 ObjectARX(AutoLISP) 0 2009-04-26 06:19 PM
【转帖】data storage in sw docs yang686526 SolidWorks二次开发 0 2009-04-13 10:11 AM


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


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