![]() |
【转帖】setlimmin Setlimmax Problem
setlimmin setlimmax problem
setlimmin setlimmax problem i have a problem with setlimmin and setlimmax - it simply do not work. code: { oddblayoutptr layout = _importer->blocks().currentblock()->getlayoutid().safeopenobject(oddb::kforwrite); odgepoint2d limmin(minpt.x, minpt.y); odgepoint2d limmax(maxpt.x, maxpt.y); layout->setlimmin(limmin); layout->setlimmax(limmax); } { oddblayoutptr layout = _importer->blocks().currentblock()->getlayoutid().safeopenobject(oddb::kforread); odgepoint2d limmin; odgepoint2d limmax; limmin = layout->getlimmin(); limmax = layout->getlimmax(); // here, i get value that was before call to setlimmax, instead of value i've passed to setlimmax. } tia quote: originally posted by sliwka i have a problem with setlimmin and setlimmax - it simply do not work. btw, why there exists method oddbplotsettings::getplotpapersize but oddbplotsettings::setplotpapersize does not exist? use the oddbdatabase methods oddbdatabase::setlimmin() and oddbdatabase::setlimmax(). also one strange thing: in the place where you initialize your oddbdatabase object, type this: pdb->setlimmin(pdb->getlimmin()); pdb->setlimmax(pdb->getlimmax()); it sorts out a problem with synchronization between oddbdatabase and oddblayout concering the limmin and limmax values. hope this helps. regards chudomir as to your plot setting question, i know a function called setclosestmedianame(). but i don't know its behaviour in dwgdirect. you should have some tries... regards chudomir here is a documentation from object arx: "virtual acad::errorstatus setclosestmedianame( acdbplotsettings* pplotset, const double paperwidth, const double paperheight, const plotpaperunits units, adesk::boolean matchprintablearea) = 0; pplotset input pointer to acdbplotsettings object paperwidth input paper width to match paperheight input paper height to match units input units represented by paper width and height matchprintablearea input boolean as to whether a match should be performed against the printable area or the physical boundary of the target media size for the configured plot device, sets the closest matching media size on the given acdbplotsettings object using the input criteria. this function is not implemented." so i suppose it won't work in dwg direct too most probably the function should be setplotcfgname or setplotsettingsname... quote: originally posted by chudo as to your plot setting question, i know a function called setclosestmedianame(). but i don't know its behaviour in dwgdirect. setclosestmedianame() is the function of plotsettingsvalidator. plotsettingsvalidator object is returned by hostappservices and should be user implemented, because it is platform dependent - it should deal with printer drivers (query for properties and supported paper sizes). we provide some basic fuctionality in oddbplotsettingsvalidator, but only for platform independent devices: 'none' and 'dwf eplot.pc3' thanks for this info! sliwka, you are right, dblayout::setlimmin() & setlimmax were wrong. they didn't update proper layout variables. it was fixed for next release not long ago. concerning oddbplotsettingsvalidatorimpl::setclosestmedianame (). if device is neither 'none' nor 'dwf eplot.pc3' the function chooses one of the predefined values. i was done for dd 1.11. the predefined values were got from msvc help. misha kuzinets quote: originally posted by misha kuzinets sliwka, you are right, dblayout::setlimmin() & setlimmax were wrong. they didn't update proper layout variables. it was fixed for next release not long ago. is this release available now? and what is it's number? i've got the newest one and the problem still exists. setlimmin() does nothing. quote: originally posted by sliwka is this release available now? and what is it's number? i've got the newest one and the problem still exists. setlimmin() does nothing. no, this is not. it will available in the next release (i.e. dd v1.12). if you are a founding member (i.e have a source code), i may send you a patch. misha kuzinets |
所有的时间均为北京时间。 现在的时间是 11:58 PM. |