Add-In Development

Valued Contributor
Valued Contributor

 

HI,

 

I need some help regarding SolidEdge Add-IN development.

 

I used JasonNewell AddinWizard as a starting point.

 

1. How to define and call add in methods?

 

I need to call the addin from a vbscript, something

like:

 

call SolidEdge.Addin.MyMethod

 

How to do that?

 

2. How to add one or more activex object inside the Edgbar panel?

 

3. How to call the add-in when solidedge start?

 

I need the addin tu run and add a toolbar on the main window,

before opening any SolidEdge document

 

Thanks in advance for any help or example.

 

Best Regards

 

Massimo

 

Posted by: Massimo Magris
Post date: 1/19/2009 11:23:50 AM

3 REPLIES

RE: Add-In Development

Valued Contributor
Valued Contributor

Massimo,

 

I need to do a little testing before I answer your question. Will get back with you.

 

Posted by: Jason Newell
Post date: 1/20/2009 7:33:55 AM

RE: Add-In Development

Valued Contributor
Valued Contributor

 

Answer to #1:

I suppose that it's possible but I've never tried it.  You should be able to access your addin via Application->Addins->Item(x).  I suppose if you register the typelib for your addin and have a custom Interface then you could QueryInterface() for it.  Never tried it.

 

 

Answer to #2:

 

I haven't tried adding an ActiveX control to a dialog.  I don't have time at the moment to look but I would figure that there are plenty of articles to be found on google.

 

 

Answer to #3:

You need to add CATID_SEApplication to your AddIn.rgs like this:...ForceRemove 'Environment Categories'{ ForceRemove '{BAD41B8D-18FF-42c9-9611-8A00E6921AE8}' = s 'CATID_SEAllDocumentEnvrionments' ForceRemove '{26618394-09D6-11d1-BA07-080036230602}' = s 'CATID_SEApplication'...}These CATIDs can be found in C:\Program Files\Solid Edge XX\SDK\include secatids.h.

 

Posted by: Jason Newell
Post date: 1/27/2009 7:10:14 AM

RE: Add-In Development

Valued Contributor
Valued Contributor

 

HI Jason,

 

Thanks for the infos,

I  still need your help for this addin info.

 

I created a new add from your template and modified.

I added an interface, that i must be able to call from visual basic.

 

Attacched

- DBSolidedge, the addin

- Test, vb project

 

My nees is to be able to

    DBWShell.CallBack ("TESTCOMMAND")

 

Thanks in advance,

best regards

Massimo

 

------------------------------------------

Private Sub Form_Load()

    Call createDBSolidEdgeApplicationObject

End Sub

 

Private Sub createDBSolidEdgeApplicationObject()

    Dim oApplication As SolidEdgeFramework.Application

    Set oApplication = GetObject(, "SolidEdge.Application")

 

    'Get the addins

    Dim addIns As SolidEdgeFramework.addIns

    Set addIns = oApplication.addIns

 

    'Find the add-in you are looking for

    Dim CustomAddIn 'As SolidEdgeFramework.AddIn

 

    For i = 1 To addIns.Count

        If addIns(i).Guid = "{29B8E71D-5705-4472-8062-C57CFCB16B7E}" Then

            MsgBox "Addin:" & vbCrLf & addIns(i).Description & vbCrLf & addIns(i).Guid

            Set CustomAddIn = addIns.Item(i)

            Exit For

        End If

    Next

 

    Dim DBWApp As DBSolidEdgeLib.Connect

 

    Set DBWApp = CustomAddIn

 

    Dim DBWAutomation As DBSolidEdgeLib.IConnect

 

    'I have to call DBWShell, that reside in Custom.Caddin

    'and is createed and inizialized throug

    'DBWAutomation.Automation (see Connect::get_automation)

 

    'At the end, I need to be able to execute this code

 

    Dim DBWShell As DBWShellApi

    DBWShell.CallBack ("TESTCOMMAND")

 

End Sub

 

 

Posted by: Massimo Magris
Post date: 2/13/2009 9:04:46 PM