几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   SolidWorks二次开发 (http://www.dimcax.com/hust/forumdisplay.php?f=111)
-   -   【转帖】using the oncomponentselectionnotify even (http://www.dimcax.com/hust/showthread.php?t=5864)

yang686526 2009-04-13 03:12 PM

【转帖】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)


所有的时间均为北京时间。 现在的时间是 01:31 PM.