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

yang686526 2009-05-07 12:24 PM

【转帖】read block reference
 
read block reference
read block reference
hello !
i have a dwg with block reference.
i would like to access the block its refers.
how can i do that ? i tried :
code:
if (pblockit->entity()->isa()->name() == "acdbblockreference")
{
pblockref = pblockit->objectid().safeopenobject();
pblockrefit = pblockref->attributeiterator();
for (; !pblockrefit->done(); pblockrefit->step())
{
}
}
but it nevers enters in the "for".
could you please help me ?
i want to acces to getstartpoint() and getendpoint of the block
thank you very much for your help
cnice
quote:
originally posted by cnice
i would like to access the block its refers.
cnice
dbblockreference has method "oddbobjectid blocktablerecord()".
quote:
originally posted by cnice
but it nevers enters in the "for".
cnice
oddbblockreference can not have attributes so you don't enter in the "for".
quote:
originally posted by cnice
i want to acces to getstartpoint() and getendpoint of the block
cnice
what getstartpoint() and getendpoint of the block means? oddbblockreference has position() and you can get geometry extents(getgeomextents(odgeextents3d& extents)).
best regards,
sergey z.


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