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

yang686526 2009-05-05 11:24 AM

【转帖】getlayoutid90working
 
getlayoutid()working?
getlayoutid()working?
have a block reference pointer to a insert entity, trying to call getlayoutid to get the layout name but keeps returning knull. isthisimplemented?
cp
oddbblocktablerecordptr pblocktableref = pinsert->blocktablerecord().safeopenobject();
oddbobjectid layoutid = pblocktableref->getlayoutid();
getlayoutid() returns non-null only for layout blocks: *modelspace, *paperspace, *paperspace0 etc.
sergey slezkin
ok,i understand getlayoutid() return null.
how do i getthe layout name in dictionary from the blocktablereconrd ?
cp
having layout id you can use
oddblayout::getlayoutname()
or
oddbdictionary::nameat(oddbobjectid)
sergey slezkin
oddbblocktablerecordptr pblocktableref = pinsert->blocktablerecord().safeopenobject();
oddbobjectid layoutid = pblocktableref->getlayoutid();
but getlayoutid() returns null so i can't oddbdictioary;:nameat( id )
cp
if getlayoutid() returns null than this is not a layout block (not model nor paper space).
if it's an "ordinary" block it may be not inserted at all or it may be inserted in multiple layouts.
layout name makes sense only for layout block table records.
sergey slezkin


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