查看单个帖子
旧 2009-05-07, 03:31 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】select An Object By Mouse To Setget Its Properties

select an object by mouse to set/get its properties
select an object by mouse to set/get its properties
hi everybody,
i searched a lot in the forum on this subject, but unfortunately all i found were unanswered or outdated :-(
i抎 like to know that is it possible to give this ability to users of my program to select an object (such as lines or rectangles? by mouse?
in other word, i want a very very simple cad-like program.
users do not need to draw, all they need is to select (internally drawn) objects by mouse to set or get its properties.
impossible or i抦 possible???
quote:
originally posted by mohammad
hi everybody,
i searched a lot in the forum on this subject, but unfortunately all i found were unanswered or outdated :-(
i抎 like to know that is it possible to give this ability to users of my program to select an object (such as lines or rectangles? by mouse?
in other word, i want a very very simple cad-like program.
users do not need to draw, all they need is to select (internally drawn) objects by mouse to set or get its properties.
impossible or i抦 possible???
possible :-)
i dont know if a routine exists inside of opendwg, but the steps to take otherwise are :
1 . create a octtree (3d) or a quadtree (2d), and index the entities .
2 . as the user moves around the drawing, map back to the index, and search for all intersecting/closest entities in that quadrant of the tree.
3 . look up entity from oddbdatabase.
quadtree's and octtree's are heavily documented : see
or
to get started.
cheers
jason
look at examples\win\odamfcapp sample
vladimir
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)