![]() |
【转帖】use Of Oddbdimstyletablerecord In Dimension
use of oddbdimstyletablerecord in dimension
use of oddbdimstyletablerecord in dimension hi all, i have to use the oddbdimstyletablerecord, while i read the dwg file and get the oddbdimstyletablerecord which contains only arrowid method which returns the object id of the arrowhead block for the specified arrowhead type, that is not all suficient data for dimstyle. how can i fetch the other dim style data such as lines parameter, text, tolerances, primary units to draw the dimension properly. if i want to create new oddbdimstyletablerecord what are necessary parametrs for it and want to associate it with particular dimension how can i do it. thanks in advance sunny kumar hi, you can find description oddbdimstyletablerecord methods in dwgdirect reference topic "oddbdimstyletablerecord" or in dimvardefs.h in folder "include". for example getdimblk1(), getdimclre(), getdimgap() and etc. you can find default value (create new style) in dimvardefs.h also. best regards, sergey z. last edited by sergey z.; 1st august 2006 at 03:28 amfff">. getdimblk1, getdimgap present in oddbdimstyletablerecord hi sergey, thanks to reply, i have still problrm that in dwgdirect reference there is no getter method so how i can i use it, is it defined somewhere else please explain it more and how can i access the getdimblk1(), getdimgap etc. regards sunny kumar quote: originally posted by sergey z. hi, you can find description oddbdimstyletablerecord methods in dwgdirect reference topic "oddbdimstyletablerecord" or in dimvardefs.h in folder "include". for example getdimblk1(), getdimclre(), getdimgap() and etc. you can find default value (create new style) in dimvardefs.h also. the file dimvardefs.h contents dimension variables definitions. or see acad help "system variables" topic. all methods for access dimension variables are made by the same notation. for example acad variable dimasz: double getdimasz(), void setdimasz(double). here is example code: code: oddbdimstyletablerecordptr pdimstyle = oddbdimstyletablerecord::createobject(); pdimstyle->setname(dimstylename); oddbdimstyletableptr ptable = pdatabase->getdimstyletableid().safeopenobject(oddb::kforwrite); oddbobjectid dimstyleid = ptable->add(pdimstyle); // setting property oddbobjectid id; pdimstyle->getdimblk1(id); pdimstyle->setdimgap(0.2); pdimstyle->setdimasz(2.0); // getting property oddbobjectid blockid = pdimstyle->getdimblk1(); double gap = pdimstyle->getdimgap(); double asz = pdimstyle->getdimasz(); best regards, sergey z. |
| 所有的时间均为北京时间。 现在的时间是 11:16 PM. |