Visual Studio .NET 2005 Addin for Solid Edge

Well I finally downloaded Visual C# 2005 Express Edition from the web today. I wanted to see if I could make an Addin work in the .NET Framework 2.0. Below is a screenshot. Nothing fancy but it is in 2.0 .

 

I suppose I need to create forums for Visual Studio .NET 2005. I named the other one 2003 on purpose because I wanted to keep them separate. I would imagine that the majority of the SE programming community will be slow to move to 2005 as I'm still trying to get you guys on 2003 .

 

When I get some free time next year, I have a lot of plans for VS.NET 2005 templates \ addins \ etc. I have templates and stuff for VS.NET 2003 but I didn't do a very good job with it. I'm going to put 100% into VS.NET 2005 "goodies".

 

 

 

 

Posted by: Jason Newell
Post date: 11/9/2005 10:30:48 AM

9 REPLIES

RE: Visual Studio .NET 2005 Addin for Solid Edge

Hi Jason,

 

Nice too see Your progress with 2.0

I have been trying to upgrade some of your 1.0 samples, with no succes, anychance you would like to share your little app? Have You upgraded any VB samples?

 

Best regards

Jacob

 

Posted by: Jacob Nielsen
Post date: 8/2/2006 1:20:29 AM

RE: Visual Studio .NET 2005 Addin for Solid Edge

Jacob,

 

Everything .NET 2.0 that I have can be downloaded here.

 

Regarding using .NET 2.0 to develop a Solid Edge Addin, well that's a very long and complicated story. I'll try to explain it though in case others are interested.

 

Facts:

1. Solid Edge dictates what version of the CLR to load. The required CLR version will vary from SE version to version. v17 & v18 requires .NET 1.1, v19 will require .NET 2.0.

2. We must match CLR versions that SE requires. While in theory we shouldn't have to, that's just the case.

3. Microsoft introduced "breaking" Interop changes in .NET 2.0. These changes broke my .NET 1.1 templates.

4. .NET addins tend to cause a lot of crashes. Main reason that .NET was not built with COM in mind, but rather an after thought. Since we're not working with a native COM platform, we must "interop" our way through to COM and that is not always a trivial task.

 

Over the past 6 months or so, I have learned to code in C++, which can work with native COM. It is a much cleaner interface and is much more reliable. Now I know that not everyone can deal with C++ and there lies the problem. I'm really down right now on .NET addins. The main reason is all of the hoops you have to jump through to get things to work.

 

I'm in close contact with Solid Edge development and I know they are very frustrated with .NET, especially with .NET addins. It is a support nightmare for them. Initially I felt that it was just their lack of willingness to embrace new technology. I have since realized that their arguments are valid. Keep in mind that they have direct support from Microsoft. I have been included in some of the conversations and in some cases they get a response like "well that's just how it works". I've done my best to educate people on how to do things right but I'm starting to realize that for most, it is just too much to overcome. My templates can only get you started. Everything else you code after that has to be perfect or you'll easily crash Solid Edge.

 

I don't mean to be negative about .NET. I still love coding in .NET and I'm still very much an advocate, but like I said, I've come to the realization that it may not be the best answer in every situation.

 

So this gives some insight into why I haven't released any new templates. I'm just really torn as to whether or not I should still be pushing .NET addins when I'm aware of so many issues that people will have to deal with.

 

Posted by: Jason Newell
Post date: 8/3/2006 5:36:11 AM

RE: Visual Studio .NET 2005 Addin for Solid Edge

Hi Jason,

 

can you recommend any good C++ books

 

Cheers

Calum

 

Posted by: Calum McLellan
Post date: 8/3/2006 6:46:06 AM

RE: Visual Studio .NET 2005 Addin for Solid Edge

Calum,

 

To this day I haven't read 1 C++ book. I have ordered a C++ ATL COM book off Amazon but it's backordered. Solid Edge has a wizard for Visual C++ 6.0 for creating C++ addins. That was my starting point and I have since developed my own from the ground up without using the wizard. The SE provided templates still work great to this day but in my opinion are starting to get a bit dated. I saw several opportunities for improvements in the architecture and implemented the changes in my templates.

 

The Astroid Addin for Solid Edge was actually my 1st C++ project. I would not be as far along as I am now if it wasn't for the help of John Hilton from Spatial Freedom. That man is amazing when it comes to C++ programming.

 

Anyway, I've spoken with R.D Holland from Solid Edge. He's the programmer that developed the Solid Edge Addin template wizard for VC++ 6.0. He thought it would be a great idea if I update the templates and share them with the community and that's exactly what I plan on doing. Since I'm still learning and tweaking my templates, I plan on waiting a bit until I get everything ironed out.

 

Posted by: Jason Newell
Post date: 8/3/2006 7:35:10 AM

RE: Visual Studio .NET 2005 Addin for Solid Edge

Jason,

 

fair enough, I guess i'll wait for the 'ironed out' version before I try anything new

 

on a side note - have you taken a look at the CodeSnippets in VS 2005. Seems to me you could save a lot of time. I have attached an example for getting a Solid Edge doc - if you put this in the My Code Snippets folder then it appears as GetSEDoc in Intellisense - just hit the TAB button twice and Robert's your fathers brother...

 

Posted by: Calum McLellan
Post date: 8/3/2006 8:06:46 AM

RE: Visual Studio .NET 2005 Addin for Solid Edge

Calum,

 

I'm sure you have already but have you looked at example addin I posted in the C++ forum? Should be a good strarting point for learning.

 

Posted by: Jason Newell
Post date: 8/9/2006 4:36:04 AM

RE: Visual Studio .NET 2005 Addin for Solid Edge

Hi Jason,

 

it was the first thing on my list for the morning

 

Cheers

Calum

 

Posted by: Calum McLellan
Post date: 8/9/2006 4:44:23 AM

RE: Visual Studio .NET 2005 Addin for Solid Edge

I know this has been asked before, but after reading this topic, I am again confused. Which program should I start with. I would like to start programming SE. Though I would like to leave the posibility open to program wss and SE Insight. Though right now I would just like to write some SE programs that work, so I can prove to some people here at work, that it is worth my time and theirs for me to learn programing.

 

Posted by: Chris Estelle
Post date: 10/26/2006 9:47:45 AM

RE: Visual Studio .NET 2005 Addin for Solid Edge

Hi Chris,

 

If you want to program with sharepoint then you will need to go with a .net language. I would then have to recommend c#.

The reason for that recommendation is that although VB.Net is a bit easier to learn syntax-wise, c# is a good base if you want to make the move to c++. I'm not saying that c# and c++ are more similar than any other .Net language and c++, I just think that if you don't have any programming background then you might as well learn the 'C' style syntax.

.Net runs OK with regards to Solid Edge macros - there are a few functions where it's difficult to know what to pass, but on the whole there's no major problems.

Add ins are a different story - it's looking like c++ is the way... makes sense that the communication is better when you're using the same technology.

 

Basically I'd say start with C# - it's less daunting than c++ and you'll be fine until you start getting into addins. You'll also have the advantage of being able to program web-parts and event handlers in sharepoint.

Speaking from 2-3weeks experience, the transition from C#/VB.Net to C++ isn't to bad if you've got a reasonable grasp of basic programming concepts (which you will, in my opinion, be more likely to have if you use C# then if you use VB.Net).

 

Whatever you choose there's people out there to help.

 

Hope this helps

Cheers

Calum

 

Posted by: Calum McLellan
Post date: 10/26/2006 11:03:12 AM