Reg- Menu building

 

Hi All I am Jaya

I am a Mechanical engineer and API developer. I dealed with Solidworks API a lot. but in Solidedge I know very few things only. I am good in VB.Net (2003). My SolidEdge is SE V18.

Now I have a requirement to develop a menu bar (like  FIle, View, Edit, Tools) for customizing and inserting commands as per our company's standard. I made a search in this forum and copied the following code, but it does not work. Then what is syntax or procedure for adding a menu.

here is the code I used. Your help is greatly appricated

 

#

Region "External References"

Imports Microsoft.VisualBasic

Imports Microsoft.Win32

Imports SolidEdgeFramework

Imports SolidEdgeConstants

Imports System

Imports System.Reflection

Imports System.Runtime.InteropServices

'Imports System.Windows.Forms

#

Namespace

 

 

 EndRegion SEAddin1True)> _PublicClass AddinImplements SolidEdgeFramework.ISolidEdgeAddIn ', SolidEdgeFramework.ISEApplicationEvents, SolidEdgeFramework.ISEAddInEvents

 'Implements SolidEdgeFramework.ISEAddInEvents_Event

 

 

 

 

 

 

 PrivateConst CATID_SolidEdgeAddin = "{25044182-09C2-429a-970C-526AF3007830}"PrivateConst CATID_SEPart = "{424EE515-FCB0-47cf-A34B-B7F8D03512E7}"PrivateConst CATID_SEAssembly = "{BA9AB1F7-EE82-42c0-9351-B9BD82D08E4D}"PrivateConst CATID_SESheetMetal = "{5183E2B6-F4E0-421b-B144-EB6ED89799ED}"PrivateConst CATID_SEDraft = "{89DDB19F-76E5-4aaf-9BC3-68F7277FFC91}"PrivateConst CATID_SEWeldment = "{E2E2A4C9-2017-4689-815C-4C4EB7D88CE5}"'Private addin As SolidEdgeFramework.AddIn

 'Private application As SolidEdgeFramework.Application

 'Private connectionPoints As New Hashtable()

#

 

MsgBox("OnConnection")

 Region "On Connection"PublicSub OnConnection(ByVal Application AsObject, ByVal ConnectMode As SolidEdgeFramework.SeConnectMode, ByVal AddInInstance As SolidEdgeFramework.AddIn) Implements SolidEdgeFramework.ISolidEdgeAddIn.OnConnectionEndSub

#EndRegion

#

 

MsgBox("OnConnectToEnvironment")

 Region "On Environment"PublicSub OnConnectToEnvironment(ByVal EnvCatID AsString, ByVal pEnvironmentDispatch AsObject, ByVal bFirstTime AsBoolean) Implements SolidEdgeFramework.ISolidEdgeAddIn.OnConnectToEnvironmentEndSub

#EndRegion

#

 

MsgBox("OnDisconnection")

 Region "On Disconnection"PublicSub OnDisconnection(ByVal DisconnectMode As SolidEdgeFramework.SeDisconnectMode) Implements SolidEdgeFramework.ISolidEdgeAddIn.OnDisconnectionEndSub

#EndRegion

#

_

 

 Region "Registering functions"PublicSharedSub Registerfunction(ByVal t As Type)OnErrorResumeNext

 

Basekey = Registry.ClassesRoot.CreateSubKey("CLSID\{" + t.GUID.ToString() + "} ")

 Dim Basekey As RegistryKeyIfNot (Basekey IsNothing) Then

Basekey.SetValue("AutoConnect", 1)

Basekey.SetValue("409", "SEAddin")

Basekey.CreateSubKey("Implemented Categories\" & CATID_SolidEdgeAddin)

Basekey.CreateSubKey("Environment Categories\" & CATID_SEAssembly)

Basekey.CreateSubKey("Environment Categories\" & CATID_SEDraft)

Basekey.CreateSubKey("Environment Categories\" & CATID_SEPart)

Basekey.CreateSubKey("Environment Categories\" & CATID_SESheetMetal)

Basekey.CreateSubKey("Environment Categories\" & CATID_SEWeldment)

Basekey.Close()

 EndIf

 EndSub

#EndRegion

#

_

 

 Region "UnRegister Function"PublicSharedSub UnRegisterFunction(ByVal t As Type)OnErrorResumeNext

Registry.ClassesRoot.DeleteSubKeyTree("CLSID\(" + t.GUID.ToString() + ")")

 EndSub

#EndRegion

 

EndEndClassNamespace

 

Thanks

Jaya

 

Posted by: jaya priyan
Post date: 12/17/2007 10:57:03 PM

7 REPLIES

RE: Reg- Menu building

 

I replied here

 

Posted by: Jason Newell
Post date: 12/19/2007 8:01:41 PM

RE: Reg- Menu building

Hi jaya,

This is Prasad. R u from India? I am also not old to SE customization.So any help would be appriciated. Thanks

 

Posted by: Prasad Pawar
Post date: 12/19/2007 9:09:02 PM

RE: Reg- Menu building

Hi Prasad

Nice to hear from you. You are right, I am from India. I am Good in Solidworks Customization. But now we bought SE licence. So I need build menus (like file, edit, view...). Have you ever built like this ? If provide some Ideas to me.

 

Thanks

Jaya

 

Posted by: jaya priyan
Post date: 12/19/2007 9:22:25 PM

RE: Reg- Menu building

After a long try I am able to create the toolbar.

Here are some more doubts.

 

What is the syntax for creating Menu (like File, Edit, View)?

How to change the calculator image buttom in MYToolBar?

How to add commands for the toolbar buttons?

 

Thanks

Jaya

 

Posted by: jaya priyan
Post date: 12/20/2007 2:49:04 AM

RE: Reg- Menu building

 

Jaya,

Everything that you need can be found in this post.  You also need to read "C:\Program Files\Solid Edge VXX\SDK\Samples\Addins\Doc\addin.doc".

The fact still stands that you can only develop with VS.NET 2005 for Solid Edge V19 and higher.

 

Posted by: Jason Newell
Post date: 12/21/2007 9:45:03 PM

RE: Reg- Menu building

 

Jason.

 

Is this true that for v19 and higher you can only develop in vs.net 2005?  I am still able to run and modify my existing code in vb6.

 

Posted by: Carl Breving
Post date: 1/26/2009 7:35:12 AM

RE: Reg- Menu building

 

Carl,

The discussion was specific to .NET.  VB6 is not affected by this discussion because it was pre-.NET.

 

Posted by: Jason Newell
Post date: 1/27/2009 6:02:09 AM