![]() |
【转帖】oddbdimension issue
oddbdimension issue
oddbdimension issue i'm trying to use a temporary dimension entity to draw a sample for a dimensioning tool. if i call recomputedimblock after adding it to the database it works. however if i haven't added it then it crashes. i'd like to only add it to the database on (successful) completion of the tool. suggestions? george, i am calling the setdatabasedefaults after creating my temporary entity. i've attached my code for the creation of the aligned dim object on a mouse click. code: m_pt0=m_pt1=pt; m_pnewaligneddim=oddbaligneddimension::createobject(); m_pnewaligneddim->setdatabasedefaults(pvw->database()); m_pnewaligneddim->setnormal(getviewingdirection()); m_pnewaligneddim->setdimensiontext("yada"); m_pnewaligneddim->setdimensionstyle(pvw->database()->getdimstylestandardid()); odgepoint3d start, end; pvw->getworldstartendpoints(start, end,m_pt0,m_pt1); m_pnewaligneddim->setxline1point(start); m_pnewaligneddim->setxline2point(end); m_pnewaligneddim->setdimlinepoint(end); m_pnewaligneddim->usedefaulttextposition(); //crashes here!!!! m_pnewaligneddim->recomputedimblock(); pvw->overlapdraw(m_pnewaligneddim); |
| 所有的时间均为北京时间。 现在的时间是 02:45 PM. |