Mouse Moving

Discussion in 'SolidWorks' started by Sean Phillips, Sep 22, 2003.

  1. Does anyone know how i can tell through the api. what the mouse is
    held over. things turn red when you hold the mouse over them. ie:
    vertex, edge, surface. is this already a part of the api.
     
    Sean Phillips, Sep 22, 2003
    #1
  2. you already asked, and I already answered:

    I'm afraid it is not available directly, you'll have to do something rather
    tricky:
    use microsoft's windows API to obtain the mouse pixel position in your
    ModelView,
    then ModelView::Transform to obtain the XYZ position in model space
    then use ModelView::GetEyePoint to define a vector going from your eye
    through the obtained point
    and finally ModelDoc::RayIntersections+GetRayIntersectionsTopology, quite
    complex especially in assemblies, to obtain the desired points.
    Another way is to request apisupport to implement this api, and wait a few
    years...
    Maybe you'd rather stick to selections...
     
    Philippe Guglielmetti, Sep 23, 2003
    #2
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.