Solidedge ST9 - Ribbon in vb.net

Creator
Creator

Hi everyone,

 

hope someone can help me on this one. I developed a Solidedge Addin which has different buttons inside the ribbon.

 

This is working just fine in Solidegde ST6, but it doesn't work in ST9 for some reason.

 

What I'm doing to load my custom ribbon is:

Inside the Event "SolidEdgeFramework.ISolidEdgeAddIn.OnConnectToEnvironment"

 

  • pAddinEx.SetAddInInfo

 

pAddinEx.SetAddInInfo(ResHandle, EnvCatID, CategoryName,
                                    CmdImageMediumColor, CmdImageLargeColor,
                                    CmdImageMediumBlackAndWhite,
                                    CmdImageLargeBlackAndWhite, commandsCount,
                                    commandNames, commandIDs)

 

  • I'm adding my commands in a loop using: AddCommandBarButton

 

 Dim oCmdButton As CommandBarButton =
                    pAddinEx.AddCommandBarButton(EnvCatID,
                                                 sGroupName,
                                                 iID)
oCmdButton.Enabled = True
oCmdButton.Style = oRibbonButton.Style

 

Now I have the following issues with that code in ST9:

  1. My ribbon does not have its own name within the ribbons tab, as all my commands are within the "Add-Ins" tab
  2. All commands are greyed out (disabled)

 

Unfortunately the exact same code is working with ST6, so I'm kind of stuck on that one.

 

Now, what I came across is the "Solid Edge Community Template" by Jason Newell, which is great and it works just fine as it adds the ribbon buttons. But I don't want to use right now, because I would need to rewrite all the code, but this is way toooo much. Or do I have to use it, because the "old api" doesn't work anylonger?

 

Any help would be greatly appreciated.

 

Regards,

AP

4 REPLIES

Re: Solidedge ST9 - Ribbon in vb.net

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom
Hello AP,
Have you updated the interops? Just a guess.
I have add-in working correctly with ST9 without using the community libs.
regards

JB
VS2015, SE ST10

Re: Solidedge ST9 - Ribbon in vb.net

Creator
Creator

Hello JB,

 

thanks for your reply. But yes, I've updated the interops.

It's good to know, that it's still possible without the community libs.

 

Did you change something in the code from ST6 to ST9, according to the ribbon creation?

Have you experienced any similar struggle with the ribbon or was it just swapping the interop libs and it worked right away?

 

Regards,

AP

Re: Solidedge ST9 - Ribbon in vb.net

Legend
Legend

Hi @AP

 

Have you updated the line AddInEx.GuiVersion in OnConnection event inside MyAddin.cs file?

 

In the past I had problems since I forgot to change this parameter

 

Hope it helps.

Héctor Pelayo Izquierdo
Engineering Department, JAE Ingeniería y Desarrollos, S.L.
Solid Edge ST9 MP5 | NX 9
Development: VB.NET

Re: Solidedge ST9 - Ribbon in vb.net

Creator
Creator

Hello Hector,

 

yes, I also did that. Can't find the mistake.

Can anyone provide a working example of doing this? That would be so helpful.

 

Thank you guys for your help.

 

Regards,

AP