Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Get component name when move mouse on a face

1 REPLY 1
Reply
Message 1 of 2
ngocson8335
246 Views, 1 Reply

Get component name when move mouse on a face

Hello everyone,

 

I would like to get a component name when moving the mouse without clicking on that face. I tested with watcher events but could not find the right one.

 

2021-06-29_16h47_32.png

 

Thank you so much.

Ngoc Son
Autodesk User
1 REPLY 1
Message 2 of 2
yan.gauthier
in reply to: ngocson8335

Hi,

 

You can do this by implementing the Commandmanager.UserInputEvent.OnPreselect

 

You did not mention if you wanted to do this from Ilogic, VBA or .NET addin.

 

Unless you do it from an addin, you will need a user input to subscribe to such event. In VBA, you would create a class module that implement UserInputEvents

 

Dim WithEvents oEvents As UserInputEvents

Private Sub Class_Initialize()

    Dim oCommandManager As CommandManager
    Set oCommandManager = ThisApplication.CommandManager
    Set oEvents = oCommandManager.UserInputEvents

End Sub



Private Sub oEvents_OnPreSelect(ByVal PreSelectEntity As Object, DoHighlight As Boolean, MorePreSelectEntities As ObjectCollection, SelectionDevice As SelectionDeviceEnum, ModelPosition As Point, ViewPosition As Point2d, View As View ) 
 

    
    If TypeOf PreSelectEntity Is SurfaceBody Then
  
    
    End If
   
End Sub

 

Your macro would create a new object of type (class_name). 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


Autodesk Design & Make Report