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

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   DirectDWG (http://www.dimcax.com/hust/forumdisplay.php?f=89)
-   -   【转帖】odavematerialdetachfromobject90 problem (http://www.dimcax.com/hust/showthread.php?t=17431)

yang686526 2009-05-06 07:09 PM

【转帖】odavematerialdetachfromobject90 problem
 
odavematerial::detachfromobject() problem
odavematerial::detachfromobject() problem
hi,
there is a problem when i try to detach a material from an object and an exception is raised. perhaps the problem is that the entity is not opened for write in the static method odavematerial::detachfromobject(). i opened the object for write before to call this method and there was no exception, but in fact the material was not detached. ideas about how to detach a material will be appreciated.
thanks in advance!
nino
hi,
this is a bug in dd. we will get it fixed in the next maintenance release.
as workaround you can use the next code:
code:
oddbobjectptr pobj = objid.safeopenobject();
odresbufptr paverb = pobj->xdata("ave_finish");
if (!paverb.isnull())
{
paverb = odresbuf::newrb(1001);
paverb->setstring("ave_finish");
pobj->upgradeopen();
pobj->setxdata(paverb);
}
regards,
sergey vishnevetsky
last edited by sergey vishnevetsky; 20th may 2005 at 07:46 amfff">.
thanks for the advice.
regards
nino


所有的时间均为北京时间。 现在的时间是 10:59 PM.