![]() |
【转帖】creating a block with attribute texts
creating a block with attribute texts ??
creating a block with attribute texts ?? hi !! i have create serveral blocks with graphics and texts !! now i want to define the texts (oddbmtext) as attributedefinition instead so they can be modify in autocad !! how do i add attributedefinitions correctly to my existing blocks - example below does not work correctly !! oddbattributedefinitionptr pattdef = oddbattributedefinition::createobject(); pblock->appendoddbentity(pattdef); pattdef->setprompt("value"); pattdef->settag("article"); pattdef->setheight(bheight); pattdef->settextstring(btextstring); pattdef->setverticalmode(oddb::ktextbottom); pattdef->setrotation(odatoradian(0)); pattdef->setlinespacingfactor(2); pattdef->setcolor(bcolor); pattdef->setlayer(blayername, false); pattdef->setlineweight(getlineweight(bpenwidth)); regards soeren your code should be enough if you insert your block in autocad. it should prompt for attribute values. if you insert references to your block in your program (oddbblockreference) don't forget to append oddbattributes to oddbblockreference sergey slezkin |
所有的时间均为北京时间。 现在的时间是 01:57 AM. |