Reply

SolidEdgeCommunity.AddIn create multiple edgebar Options

[ Edited ]

Hello,

I have been trying to create 2 edge bar using the SolidEdgeCommunity.AddIn.

I always get the last added edgebar to be displayed. Here is the code snipet:

 

public override void OnCreateEdgeBarPage(SolidEdgeCommunity.AddIn.EdgeBarController controller, SolidEdgeFramework.SolidEdgeDocument document)

{

// Note: Confirmed with Solid Edge development, OnCreateEdgeBarPage does not get called when Solid Edge is first open and the first document is open.

// i.e. Under the hood, SolidEdgeFramework.ISEAddInEdgeBarEvents[Ex].AddPage() is not getting called.

// As an alternative, you can call MyAddIn.Instance.EdgeBarController.Add() in some other event if you need.

// Get the document type of the passed in document.

var documentType = document.Type;

// Image ID is defined in AssemblyInfo.cs. var imageId = 1;

// Depending on the document type, you may have different edgebar controls.

 

switch (documentType) {

case SolidEdgeFramework.DocumentTypeConstants.igAssemblyDocument:

case SolidEdgeFramework.DocumentTypeConstants.igDraftDocument:

case SolidEdgeFramework.DocumentTypeConstants.igPartDocument:

case SolidEdgeFramework.DocumentTypeConstants.igSheetMetalDocument:

controller.Add(document, 2);

controller.Add(document, imageId);

break;

}

}

 

Could it be that this feature is not availliable.

 

Thanks , /Eric

5 REPLIES

Re: SolidEdgeCommunity.AddIn create multiple edgebar Options

I've done some testing tonight and I'm not seeing anything that we're doing wrong or could do different to get the 2nd page added. I'm going to have to ping development to see if I can get an answer. I'll let you know.

Jason Newell
Applications Architect
www.jasonnewell.net

Re: SolidEdgeCommunity.AddIn create multiple edgebar Options

Thanks a lot,

 

I will check if I can find anything, otherwise I will use a button from the ribbon bar.

 

/Eric

Re: SolidEdgeCommunity.AddIn create multiple edgebar Options

Hello,

I have the same issue, so I would like to ask if this has been solved. Thank you very much.

Re: SolidEdgeCommunity.AddIn create multiple edgebar Options

Followup for everyone. I've tested some suggestions from development but am yet to have any success. I'll keep working on it and let everyone know when I know more.

Jason Newell
Applications Architect
www.jasonnewell.net

Re: SolidEdgeCommunity.AddIn create multiple edgebar Options

Ok, pretty sure that I got it working. It works in my tests anyway. I just released an alpha build of the NuGet package. Install it and give it another go. If it looks good, I'll publish a release. Thanks!

 

https://www.nuget.org/packages/SolidEdge.Community.AddIn/109.0.0-alpha1

Jason Newell
Applications Architect
www.jasonnewell.net