Cancel
Showing results for 
Search instead for 
Did you mean: 

Query about SolidEdge Add-in

Pioneer
Pioneer

Dear All,

 

I am getting used to SolidEdge APIs and now started creating Add-in applications. Jason's Community template was useful for that.

 

Background : I am able to add my control to Edgebar, but everytime a new document is opened, the control is added again. I want my control to remain there even if any documents are opened or closed. In fact, I want my control even if no document is open in SolidEdge.

 

Query : I want to add my control in SolidEdge TaskPane. By TaskPane, I mean the right side Pane in which we see learn solid edge, You tube, Facebook, SolidEdge community.

 

Can someone help ?

 

5 REPLIES 5

Re: Query about SolidEdge Add-in

Valued Contributor
Valued Contributor

If you close all documents, you no longer have any of the document UI stuff.  These bars are part of the document window.  And so you must make your window independent of Solid Edge.  Just make an ordinary window and put it somewhere.  

------------------
Alan Baljeu
Owner, Cornerstone Intelligent Software
Developer of custom CAD software

Re: Query about SolidEdge Add-in

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

The EdgeBar architecture is such that it is truly document specific as far as the API is concerned. What I can tell you though, I can imagine a scenario with some custom programming that would allow you to display the same screen regardless of which EdgeBar is active. I'm not going to code this for you but can give you hints on the workflow.

 

My decades of cumlative Solid Edge addin knowledge is captured on GitHub. Go to that link and search "EdgeBar", "AddPage", etc to reference the code that I'm going to speak about. Line 170 is where AddPageEx() from the Solid Edge API is called. In a nutshell, it returns a HWND that represents a parent window that you can use to assign a child to. Normally, addin developers create a new child window for each parent HWND returned by the API. This is where I see an opportunity for you to change that flow logic. I believe you could have a single child window that you create and SetParent to the EdgeBar page HWND when a particular EdgeBar page becomes active.

 

Good luck!

Jason Newell
Solutions Architect
www.jasonnewell.net

Re: Query about SolidEdge Add-in

Pioneer
Pioneer
Thanks a lot AlanBaljeu, I'll try that. Can you suggest which control in seAddin application can be used for ordinary window ?
Highlighted

Re: Query about SolidEdge Add-in

Pioneer
Pioneer
Thanks Jason, I'll try that and confirm soon. Once I do it, I'll also share my code so as to help others who may be trying this.

Re: Query about SolidEdge Add-in

Valued Contributor
Valued Contributor

When I say ordinary window I mean you do NOT use seAddin for the window.  You just use Visual Studio to design a window based on Form.  Then you Show that window and it just floats independent of Solid Edge.  I expect there are a couple obstacles (thread issues) to making this approach do everything you need, and if so I don't have a ready answer to those. My work has all been using Solid Edge from a separate application so the requirements are a little different.

 

It sounds like Jason has an answer  in his proposal that addresses this.

------------------
Alan Baljeu
Owner, Cornerstone Intelligent Software
Developer of custom CAD software