高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】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
|