Reply
Solved! Go to solution

Change AddIn displayed name

Hi there

I'm creating my first AddIn (yes, I'm crazy). By now I'm trying to modify the community sample "myAddIn" for vb.net.

When I register the AddIn and start SolidEdge, in Addin Manager the addin name is 'no title' and the description is blank. How can I change this?

Thanks from Spain.
Héctor Pelayo Izquierdo
Engineering Department, JAE Ingeniería y Desarrollos, S.L.
Solid Edge ST9 MP5 | NX 9
Development: VB.NET
12 REPLIES

Re: Change AddIn displayed name

My apologies,

 

I'm trying to create an AddIn for ST6 using AddIn Sample for ST7.

 

The Addin works fine but the Addin name and description defined in register section don't work.

 

 

 

 

Héctor Pelayo Izquierdo
Engineering Department, JAE Ingeniería y Desarrollos, S.L.
Solid Edge ST9 MP5 | NX 9
Development: VB.NET

Re: Change AddIn displayed name

Hector,

 

I suspect it has to do with Locale. What locale of Windows and Solid Edge do you have installed?

 

In my recent article, Solid Edge ST7 AddIn Architecture Overview, I mentioned the registration requirements of a Solid Edge addin. Specifically, the title and summary text is locale specific. The values get written to the registry in hexadecimal format of a given Locale ID.

 

Since your using my samples from GitHub, I took a look to see what I was doing in the registration code. I quickly realized that what I offered was not robust enough and have since updated the SolidEdge.Community NuGet package to 107.2.0 and corresponding samples. This build offers a different approach to registration that should give you everything that you need. In the 107.1.0 version, I was using System.Globalization.CultureInfo.CurrentCulture which I thought would be good enough but that's American programmers for ya ;-)

 

Take a look at the updated samples. You'll see a new RegistrationSettings class being used in the Register() method. If you are unsure what LCID to use, you might try the following code in a test console application.

 

var installData = new SEInstallDataLib.SEInstallData();
var lcid = installData.GetLanguageID();

You can manually verify the registry settings by using regedit.exe and navigating to:

HKEY_CLASSES_ROOT\CLSID\{ADDIN_GUID}
HKEY_CLASSES_ROOT\CLSID\{ADDIN_GUID}\Summary

Hope this helps.

Jason Newell
Applications Architect
www.jasonnewell.net

Re: Change AddIn displayed name

Thanks Jason

 

I'll try it ASAP and tell you about.

Héctor Pelayo Izquierdo
Engineering Department, JAE Ingeniería y Desarrollos, S.L.
Solid Edge ST9 MP5 | NX 9
Development: VB.NET

Re: Change AddIn displayed name

Hi Jason,

 

Bad luck, it's no working.

 

I changed the LCID to 3082 (Spanish - Spain (Traditional Short)) in the samples but in registry, the Summary key is no created. The Title key in HKEY_CLASSES_ROOT\CLSID\{ADDIN_GUID} is missing too.

 

If i create it manually the information is displayed correctly.

 

Solid Edge Culture Info is 1034 (040a) but i have to use 3082(0c0a) to make it work.

 

I attach some pictures:

 

Code with LCID changed

and registry created by register-SolidEdgeAddin command

 

 

 

Thanks again.

Héctor Pelayo Izquierdo
Engineering Department, JAE Ingeniería y Desarrollos, S.L.
Solid Edge ST9 MP5 | NX 9
Development: VB.NET

Re: Change AddIn displayed name

There is a mistake in the code with LCID number but I can confirm that changing it by the correct number stills no working.

Héctor Pelayo Izquierdo
Engineering Department, JAE Ingeniería y Desarrollos, S.L.
Solid Edge ST9 MP5 | NX 9
Development: VB.NET

Re: Change AddIn displayed name

That is odd then. I checked the source code of the SolidEdgeAddin base class. I do not hide any exceptions so if one were to be raised, you should be catching it and displaying a messagebox with the error.

 

Would you be willing to do a Skype call sometime where you can share your desktop and I can take a closer look? My Skype name is jason.newell.

Jason Newell
Applications Architect
www.jasonnewell.net

Re: Change AddIn displayed name

Hi Jason,

 

When I register the Addin I get an exception resulting in a message box, see attached picture, but the registry process end succesfully. Only the keys concerning Locale are not created.

 

At the moment I haven´t a skype account. As soon as I get one, I'll call you.

 

Thanks again.

 

 

 

Héctor Pelayo Izquierdo
Engineering Department, JAE Ingeniería y Desarrollos, S.L.
Solid Edge ST9 MP5 | NX 9
Development: VB.NET

Re: Change AddIn displayed name

[ Edited ]

That screenshot is what I needed. I know see my mistake and will correct it later tonight and publish an update to the NuGet package.

Jason Newell
Applications Architect
www.jasonnewell.net

Re: Change AddIn displayed name

I think the error is in RegisterTitle (line 587) and RegisterSummary (line 605) functions in SolidEdgeAddIn.cs.

 

int hexLCID = int.Parse(culture.LCID.ToString("X4"))

 

You're trying to parse a string to an integer but in my case culture.LCID.ToString("X4") gives "040A" and throws an exception. In United States culture doesn't throw it because it's "0409", an integer.

 

 

 

 

Héctor Pelayo Izquierdo
Engineering Department, JAE Ingeniería y Desarrollos, S.L.
Solid Edge ST9 MP5 | NX 9
Development: VB.NET