Reply

SolidEdgeCommunity.AddIn create multiple edgebar

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<SearchBarControl>(document, 2);
controller.Add<PropBarControl>(document, imageId);

break;
}
}

 

Could it be that this feature is not availliable. 

 

Thanks ,

/Eric

1 REPLY

Re: SolidEdgeCommunity.AddIn create multiple edgebar

Post you API questions here:  https://community.plm.automation.siemens.com/t5/Solid-Edge-Developer-Forum/bd-p/SEDeveloperForum

 

The forum you posted in is for general Solid Edge questions unrelated to API use.

Ken Grundey
Production: ST6 MP14
Testing: ST9 MP1