查看单个帖子
旧 2009-05-05, 11:24 AM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】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
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)