高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】measure distance on the screen
measure distance on the screen
measure distance on the screen
hi,
i'd like to extend my dwg-viewer with the ability to
measure distances on the screen.
how can i do that?
m_pdevice->onsize(odgsdcrect(0, 1000, 1000, 0));
m_pdevice->update();
how do i know the distance betwenn the screen-points
(0,0) and (100, 100)?
i've found getmeasurement(), getinsunits(),
objecttodevicematrix() and other, but i don't know how
to use them.
can anybody help?
bye, holger.
measure distance on the screen
hi,
i've found getworldstartendpoints in odamfcapp.
it's a good sample for converting screen to wcs.
for a well known line on screen i get a distance of 7,6
and it should be 7,6 m.
but:
getinsunits returns kunitsmillimeters!
so what am i still missing?
bye, holger.
usually the modelspace units are logical units and not meters, inches, etc. insunits are used when inserting blocks from outer drawings, in order to match between the interpretation of the different units. so you can show your measures in units, or maintain your own variable for units.
hope this helps.
best regards
chudomir
|