Open Steve-771 opened 7 years ago
I think the addin must always be loaded or initialized, even if you don't want it visible for a certain filetype. I use bellow code to only add controlls for my addin when the file opened is of a certain filetype:
//Called when ribbons must be added.
public override void OnCreateRibbon(SolidEdgeCommunity.AddIn.RibbonController controller, Guid environmentCategory, bool firstTime)
{
//Only add the ribbon when asm/draft/part/psm is opened
if (environmentCategory.Equals(SolidEdgeSDK.EnvironmentCategories.Assembly) ||
environmentCategory.Equals(SolidEdgeSDK.EnvironmentCategories.SheetMetal) ||
environmentCategory.Equals(SolidEdgeSDK.EnvironmentCategories.Part) ||
environmentCategory.Equals(SolidEdgeSDK.EnvironmentCategories.Draft))
{
controller.Add
Same issue. I created my addin based on DemoAddIn, changed GUID, clsId But they can't be loaded at the same time, only one is loaded
@ste71m please reply with the GUID of both addins.
MyAddin: Guid("52BA0728-92CF-42A0-B2AA-C6B20CC1FBCB") DemoAddin: Guid("605BB737-AA7E-434C-9E40-322BE8CBF1F1")
My bet is because i'm using different interop version (108 in mine and 110 in demo) I made a copy of your DemoAddin and named DemoAddin2 and they both loaded I realized the problem when a customer installed my addin and he also had another addin made by another company. I could not load mine until disabled the other one
Indeed this is an issue. SolidEdge.Community.AddIn needs to be rethought and reworked.
Thanks anyway for taking the time to investigate the issue
Our workaround has been to have all of our Add-Ins put in a single Add-in.
@Steve-771 The only problem is that the other addin is not ours :-) Thanks anyway
Hi @jlnewell, I wonder if you have had, or would have, a chance to investigate this further? I appreciate the code's all on github so we can help ourselves, but I'm afraid it's beyond me.
Hi Jason,
We have created two different AddIns that use different environments from one another.
The first AddIn is only for the Draft environment and the second is only for the Assembly environment.
After opening Solid Edge, if a Draft is opened, the OnConnection and OnConnectToEnvironment subs will run for the first AddIn. If an assembly is then opened, the ribbons for the second AddIn are not visible and the OnConnection and OnConnectToEnvironment subs are never called.
The same thing happens if an Assembly is opened first, only the it is the second AddIn that works and the first AddIn that does not.
Any ideas as to why you cannot have two different AddIns?
I appreciate any help or insight you can provide.