Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Catia VBA Macro Toolbar

Status
Not open for further replies.

Daniel Popa

Automotive
Sep 23, 2016
19
Hello everyone.

I am working on a VBA macro toolbar that would have tabs and buttons for various macros. My only problem is that I feel like I am missing something.
Currently, at the end of each macro, I have "Unload Me" to let the macro run and close the toolbar window. Without this command you could press as many macro buttons as you want but they will only run after you close the window (using "Unload Me" again).
Is there a way of making the macros run immediately after clicking the button without closing the toolbar window?

Thank you.
 
Replies continue below

Recommended for you

I just create code on button click event
Code:
Private Sub CaptureBtn_Click(sender As Object, e As RoutedEventArgs) Handles CaptureBtn.Click
        'GET CATIA V5
        Dim myCATIA As INFITF.Application
        On Error Resume Next
        myCATIA = CType(GetObject(, "CATIA.Application"), INFITF.Application)
        myCATIA.StartCommand("Capture")
    End Sub

    Private Sub StartUpBtn_Click(sender As Object, e As RoutedEventArgs) Handles StartUpBtn.Click
        Process.Start("xxxxxxxxxxxxxx")
    End Sub

I'm playing with custom toolbar too (Design using WPF).
Untitled_bcio1y.jpg
 
I'm working also on a toolbar. but still a huge amount of a work to do.

Tiago Figueiredo
Tooling Engineer
 
Apologies for my late reply.

@ferdo I tried googling it but, as your example proves, you have to know what to search for :D. I found a couple of useful answers there now.

@jenial I will try your idea as well soon and let you know how it worked out. Your toolbar looks much better, I have settled for a more classic approach.

Thank you for your help.
 
I have several states in my toolbar. One favourites and some network folders, second one more specific apps. and third window just a small icon on a screen that expands on mouse over event. In plans to add one more window that will store all of the apps that we use at work.
I call this application macros pallet. It's like a library.

Regards,
Jenia Ladkov
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor