几何尺寸与公差论坛------致力于产品几何量公差标准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)
-   -   【转帖】oddbmlineptr multiline (http://www.dimcax.com/hust/showthread.php?t=17554)

yang686526 2009-05-06 07:52 PM

【转帖】oddbmlineptr multiline
 
oddbmlineptr multiline
oddbmlineptr multiline
hello,
i want to create a block with a multiline.
here is my code :
code:
pmultiline = oddbmline::createobject();
oddbdictionaryptr pmldic = m_pexportdb->getmlstyledictionaryid().safeopenobject();
pmultiline->setstyle(pmldic->getat("odastandard"));
pmultiline->setjustification(0);
pmultiline->setscale(g_wallthickness);
for (cptwall = 0 ; cptwall<m_nbwalls ; cptwall++)
{
// begin point
wx = m_pwallstab[cptwall].m_beginpoint.x;
wy = m_pwallstab[cptwall].m_beginpoint.y ;
pmultiline->appendseg(odgepoint3d(wx,wy,0.0));
}
pmultiline->setclosedmline(true);

// adds the line to the block
proomblock->appendoddbentity(pmultiline);
i get an error as soon as i try to access the multiline (to add a vertex or to set the style ...).
do you know where this error could come from;
do i have forgotten something ?
thank you for your help
multi line style
it seems that my problem comes from the definition of my multiline style.
could somebody give me some help for creating a style for a multiline ? i want continious multiline with a given thickness.
does a default style exists ?
thank you !


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