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: 

Re-Direct "NEW" Button using VBA

1 REPLY 1
Reply
Message 1 of 2
isocam
235 Views, 1 Reply

Re-Direct "NEW" Button using VBA

Can anybody answer this question?

 

I have a vba macro that runs every time the "SAVE" button is pressed. This works exactly as I requre!!!

 

I need another macro that can run whenever the "NEW" button is pressed.

 

Is it possible??

 

For example,

 

Instead of showing the "pop-up box" with the various templates etc, can I (FOR EXAMPLE ONLY) show a message box every time the "NEW" Button is pressed, and therefore bypass the "pop-up box"

 

Many thanks in advance!!!!

1 REPLY 1
Message 2 of 2
adam.nagy
in reply to: isocam

Hi,

 

You could simply listen to the OnFileNewDialog event of FileUIEvents (under the Application class) and then say that you handled the event, and provide your own implementation instead:

Private Sub OnFileNewDialog(ByVal TemplateDir As String, ByVal ParentHWND As Long, TemplateFileName As String, ByVal Context As NameValueMap, HandlingCode As HandlingCodeEnum)
    HandlingCode = kEventHandled
End Sub

I hope this helps.

 

Cheers, 



Adam Nagy
Autodesk Platform Services

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

Post to forums  

Autodesk Design & Make Report