cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community email notifications are disrupted. While we are working to resolve, please check on your favorite boards regularly to keep up with your conversations and new topics.

Adding buttons to the ribbon with custom functions

ilyachaban
12-Amethyst

Adding buttons to the ribbon with custom functions

I've been using VB API for a couple of weeks now and now i want to add a button to the ribbon. But I can't even start an application in CREO. 
My code looks like this:

 

Imports pfcls

Module Module1
    Public asynconn As New CCpfcAsyncConnection
    Public conn As IpfcAsyncConnection
    Public session As IpfcBaseSession
    Sub Main()
        user_initialize()

        user_terminate()
    End Sub
    Sub user_initialize()
        conn = asynconn.Connect("", "", ".", 1)
        session = conn.Session

    End Sub
    Sub user_terminate()
        conn.Disconnect(5)
    End Sub

End Module

 

My protk.dat file:

 

NAME test
EXEC_FILE D:\Users\Creo_7\Test_Button.dll
TEXT_DIR D:\Users\Creo_7
STARTUP dll
delay_start FALSE
allow_stop TRUE
REVISION 2001
END

 

 config.pro:

 

protkdat D:\Users\Creo_7\protk.dat

 

What is a minimum requirements for creo VB application to run inside of CREO and how than can I add button on the ribbon?

 

Errors that I'm getting 

ilyachaban_0-1699450767676.png

ilyachaban_1-1699450775102.png

 

 

4 REPLIES 4

Take a look here:

VladimirN, thank you for those materials bu the didn't help me. 
Is there anything like this for VB API. I've found it in user guide for TOOLKIT.

ilyachaban_0-1699533105368.png

I'm able to start and use scripts that I have for now by running them in visual studio but I can't register application in creo. 

ilyachaban_1-1699533220094.png

 

Some solutions for this error:

All those articles are for TOOLKIT but I'm using VB API. 

 

Top Tags