![]() |
【转帖】extend data problem with oddbleader
extend data problem with oddbleader
extend data problem with oddbleader i cann't add a extend data into an oddbleader. the version of the librariy now i am using is 1.09. here is the code: odresbufptr xiter; odresbufptr pcur; xiter = odresbuf::newrb(1005); pcur = xiter; pcur->sethandle( pdb->getregappacadid().gethandle() ); pcur = odresbuf::newrb(1000); pcur = pcur->next( ); pcur->setstring( "dstyle" ); pcur->setnext( odresbuf::newrb(1002) ); pcur = pcur->next(); pcur->setstring( "{" ); pcur->setnext( odresbuf::newrb(1070) ); pcur = pcur->next(); pcur->setint16( 5 ); // dimblk pcur->setnext( odresbuf::newrb(1000) ); pcur = pcur->next(); pcur->setstring( "_none" ); pcur->setnext( odresbuf::newrb(1002) ); pcur = pcur->next(); pcur->setstring( "}" ); pleader->setxdata( xiter ); //this will cause an exception : invalid resbuf but before adding this extend data into this oddbleader, i have added some extend data into this oddbleader, and this did not cause an exception. an oddbleader can be added only one odresbuf ? 1. the exception is thrown because in the first resbuf application handle is stored with group code 1005 instead of 1001. 2. note that setxdata() replaces xdata of specified application (acad in your case). 3. dimstyle overrides can be added to leader and dimension by calling functions like setdimasz(), setdimclrd() etc. actually they add xdata to leader or dimension but you need not code it manually. 4. dimblk does not effect leader's arrow head. dimldrblk should be used. so your code can be replaced with single line: pleader->setdimldrblk("_none"); sergey slezkin |
所有的时间均为北京时间。 现在的时间是 06:40 AM. |