Results 1 to 2 of 2

Thread: How can I automatically run a Sub from an Inventor VBA Project?

  1. #1
    I could stop if I wanted to
    Join Date
    2003-03
    Location
    Alberta
    Posts
    260
    Login to Give a bone
    0

    Default How can I automatically run a Sub from an Inventor VBA Project?

    How can I automatically run a Sub from an Inventor VBA Project? I am using a class module where I can access different events form the application. Something like the following:

    Private WithEvents moAppEvents As Inventor.ApplicationEvents

    I need to initialize a variable in my project as the class module (moMDSCInventorAuto) so that the events will automatically trigger.

    Sub ABC()
    Dim oAuto as moMDSCInventorAuto
    Set oAuto = New moMDSCInventorAuto
    End Sub

    I can do this using a Sub but I would like a Sub that will automatically trigger when the project is loaded. I am aware of the Auto... Subs like AutoOpen but I haven't had much luck with these in a project file.

    Any ideas would be great.

  2. #2
    Member
    Join Date
    2002-05
    Posts
    47
    Login to Give a bone
    0

    Default Re: How can I automatically run a Sub from an Inventor VBA Project?

    Hi bweir,

    I have had sort of same problem (http://forums.augi.com/showthread.php?t=30478),
    but didn't succeed with any solution.
    Very interested to hear if you come through.

    Regards Claus

Similar Threads

  1. 2015: Can I move Inventor assemblies and their components to a different project?
    By gretbrough in forum Inventor - General
    Replies: 8
    Last Post: 2014-09-22, 10:05 PM
  2. DE201-4: Autodesk® Inventor™ Assembly APIs: Bolt Together Inventor Models Automatically!
    By Autodesk University in forum Customization and Programming
    Replies: 0
    Last Post: 2013-05-05, 01:28 PM
  3. Automatically load families for new project
    By david.hoag in forum Revit - API
    Replies: 11
    Last Post: 2012-09-12, 03:38 PM
  4. Project browser does automatically swaps projects
    By kevin.bell.72378 in forum ACA Wish List
    Replies: 0
    Last Post: 2008-07-22, 02:11 PM
  5. Automatically Load and Start a VBA project.
    By MZerby in forum VBA/COM Interop
    Replies: 8
    Last Post: 2005-01-27, 11:50 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •