查看单个帖子
旧 2009-04-13, 03:12 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】using the oncomponentselectionnotify even

using the oncomponentselectionnotify event
i am making an application that uses an edrawingviewer control to display assemblies in visual basic .net. i want to make it so that when the user selects a certain part in that assembly, the application would know what part it was and displays information for that part. how do i do that with the oncomponentselectionnotify even?
unfortunately that is beyond the power of edrawings api, at most you can get the components name.
originally posted by: luke malpass
unfortunately that is beyond the power of edrawings api, at most you can get the components name.
i can work with that. how do you get the components name?
it is passed in as the first variable when you recieve your notification:
status = oncomponentselectionnotify ( componentname, xcoordinate, ycoordinate)
also, you can get the name of a component by index position using:
name = emodelviewcontrol.componentname ( config, index ) (vb get property)
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)