I'm working with:
- VB.NET 2010
- Framework 4
- SolidEdge ST5
I have a problem implementing a ribbon tab in the part environment.
For the application environment it's working fine and also for the assembly environment,
but for some reason I'm not getting this to work in part environment.
As I'm pretty new to SolidEdge API, I tried getting a Ribbon Tab in each environment like this:
(From what I've read in this Forum, this is not that easy...)
Private Sub ISolidEdgeAddIn_OnConnectToEnvironment(ByVal EnvCatID As String, _
ByVal pEnvironmentDispatch As Object, _
ByVal bFirstTime As Boolean) _
Okay, between this is some code... not interesting.
Initializing variables for SetAddInInfoEx:
commandsCount (number of commands to be added)
commandNames (proper Syntax for commands, as described in the VB.NET
templateswith the SDK directory)
commandIDs (list of ids)
Dim pAddinEx As SolidEdgeFramework.ISEAddInEx
pAddinEx = pAddin
If (LCase(EnvCatID) = LCase(CATID_SEApplication)) Then
pAddinEx.SetAddInInfoEx(ResFilename, EnvCatID, CategoryName, _
CmdImageMediumColor, CmdImageLargeColor, _
CmdImageLargeBlackAndWhite, commandsCount, _
Dim oCmdButton As CommandBarButton = _
If (LCase(EnvCatID) = LCase(CATID_SEPart)) Then
.... now here I'm doing the very same Thing as in CATID_SEApplication but it simply does not work.
I have a nice ribbon in CATID_SEApplication, in assembly environment (CATID_SEAssembly) too if
I needed this. BUT not in the part environment (CATID_SEPart).
Does anyone know what else I could try to get this done?
Some help on this issue will be appreciated!!!
Posted by: Michael Thiel
Post date: 7/18/2013 9:07:44 AM
Have you stepped through your code and verified you are making the call to SetAddinInfoEx?
If so, are you sure you are in the part environment when you look at the Edge UI and not in synchronous part?
Right click in the part window and on the shortcut menu, choose "transition to ordered" (not sure of the exact text). You can look at the app caption when in part to see if it is "sync" or "ordered" as there is text added to the caption. I'm betting you are in sync part when you look at the UI and that is a different environment. Changing to ordered will reveal your tab.
If your commands are the same for ordered and sync part, add to your if statement "CATID_DMPart". DM is "sync" (the name changed but I kept the CATIDs as is to protect the innocent.
Posted by: R.D. Holland
Post date: 7/18/2013 10:37:19 AM