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: 

Mouse-click from a CommandManager.Pick( )

1 REPLY 1
Reply
Message 1 of 2
Anonymous
656 Views, 1 Reply

Mouse-click from a CommandManager.Pick( )

Hi folks,

(This is directly related to the other screen coordinate conversion post that I also made today, but is a different subject, so I made it a separate post).

With an IDW file open and with InteractionEvents configured and started, I am not receiving a mouse-click event from a CommandManager.Pick( ) action.  Is there any way to handle the mouse-click of a Pick( ) event to receive the ModelPosition (such as we would get from the usual mouse-click event handler) ?

Best regards,
--Jeff

1 REPLY 1
Message 2 of 2
dgreatice
in reply to: Anonymous

Hi.

 

try this code at VBA macro. But it cant run at iLogic rule.

 

Public Sub ModelPosition()
    Dim oDWGdoc As DrawingDocument
    Set oDWGdoc = ThisApplication.ActiveDocument
   
    Dim oSheet As Sheet
    Set oSheet = oDWGdoc.ActiveSheet
   
    Dim CMDMan As CommandManager
    Set CMDMan = ThisApplication.CommandManager
   
    Dim oView As DrawingView
    Set oView = CMDMan.Pick(kDrawingViewFilter, "Select View")
   
    MsgBox oView.Position.X & vbLf & oView.Position.Y
   
End Sub

Please use the ACCEPT AS SOLUTION or KUDOS button if my Idea helped you to solve the problem.

Autodesk Inventor Professional Certified 2014

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

Post to forums  

Autodesk Design & Make Report