PDA

View Full Version : What Programing language is Revit written in?



erikbjur
2005-10-05, 11:22 PM
What programing language was Revit written in? Was the whole thing written in C++? Or was it written in multiple languages (C#, VB, C++) and the .NET runtime. I was just curious.

Danny Polkinhorn
2005-10-05, 11:45 PM
While I don't work for the factory, an application that complex would have to be developed with C++.

HTH,

hand471037
2005-10-06, 12:04 AM
While I don't work for the factory, an application that complex would have to be developed with C++.

From talking to folks in the past that work at the Factory, I've heard that this is true. It's all in C++. Anyone from the factory wanna chime in about this?

FK
2005-10-06, 04:06 AM
Well, provided that all our job openings ask for C++, it seems pretty public...

erikbjur
2005-10-06, 03:41 PM
Could Revit be written in C# and still perform as well? I'm not trying to pry into the inner workings of Revit. I'm just amazed at Revits capabilities. I know C++ fairly well and have made numerous programs in the past that I still use today. Lately I have been learning C# as a hobby. I can do almost anything I want in C++ but I can do the same things faster in C#. I guess I was curious why they (the factory) chose one language over another. Should I not bother learning C# and stick with C++? Is C# just as capable as C++ in respect to writing Windows programs on par with Revit? I guess I am asking here because you the programer deal with this stuff all day and it seams there is no better source to hear insight from.

FK
2005-10-06, 07:03 PM
The choice between the two particluar languages may have to do with that C# did not exist eight years ago.

As far as your work... it depends on what you want to do. Every programming language can do everything that every other programming language can, but some languages are more suited for some tasks.

erikbjur
2005-10-06, 09:55 PM
Why would C++ be more suited to make a program like Revit vs C#? I hate to bomb you with questions? I'm trying to soak in some of your wisdom and experience. Thanks for answering my questions. I really appreciate your time.

FK
2005-10-06, 11:48 PM
C# is very young, so implementing something like Revit on it is life on the bleeding edge. I'd expect unexpected performance problems.

There was a conversation a while ago about what would be the perfect language for Revit. I say LISP. Seriously.

irwin
2005-10-07, 01:24 AM
The only languages that were given serious consideration were C, C++, and JAVA. In 1998 there was still a lot of talk about JAVA taking over the world but we weren't swayed by the hype. There were some aspects of C++ that weren't that mature at the time, but we decided that the best choice was C++ with some restrictions on how we used it. C# didn't exist at the time.

I actually knew of a CAD system that was written in LISP. It had various performance problems such as starting to do garbage collection in the middle of some interactive operation. The original developer told me he wouldn't use LISP if he were doing it over again, despite the fact that it was often very productive for the programmers. I don't know how far LISP has advanced since then. I doubt that an application like Revit could get good enough performance on today's hardware without explicit control of memory allocation and deallocation (which you have in C and C++, but not in JAVA and LISP).

FK
2005-10-07, 03:47 AM
To disambiguate: there was a conversation a while ago on this forum about which language would have been perfect for Revit. That's separate from the actual choice of language that Irwin is talking about. :-)

To be fair, the .net environment and C# should be thrown in with the other garbage-collecting languages. Since LISP is 10 times older than C#, if garbage collection plagues LISP, it is pretty much guaranteed to plague C# too. Microsoft isn't afraid of rewriting pieces of Windows in .net though.

Anyway, it's all hypothetical, and there are too few data points to make an educated judgement. In C++ you get better performance by managing your own memory, but on today's screamer hardware, aren't you better off optimising bottlenecks in your code instead? Does the experience of a CAD application translate well to Revit, and did that guy just fail to figure out how to optimise LISP code? I don't know.

erikbjur
2005-10-07, 05:08 PM
I want to thank you guys for your insight. This has been fascinating hearing from the brains behind my favorite software program. Sense you used C++, did you use unmanaged code or did you use the "dot NET" managed code? As far as databases go, what are your thoughts on ADO? Did you use ADO in Revit or another form of database access? Was that also a factor in the language selection? In the development of Revit, how much attention was spent on finding memory leaks and performance bottle necks and then optimizing the code? Is that the major time constraint or is developing new features the most time consuming?

FK
2005-10-07, 10:35 PM
You know, I can share my programmer's insight, but I can't really discuss Revit's internals.

The .net environment did not exist eight years ago either, and the first implementation of Managed C++ is (to me) unbearable. The Java/.net virtual machines and native execution are seriously different world views and it's hard to bridge the gap.

C++ memory management is trivially handled by automatic pointers. If you don't use them, you are asking for trouble.

erikbjur
2005-10-11, 12:19 AM
I apologize for seaming to pry into confidential material. I guess I was getting carried away. Maybe I could ask your personal preferences on some programming issues. I am eager to learn the new technologies out there but am overwhelmed by the shear volume of material and languages. I have to agree with you on managed C++. It seams like a waste of time and a step back wards. I guess I was originally asking if my time is better spent learning new technologies (like C#, .NET, ADO) or sticking with C++ and getting really good at it. I was trying to learn the WTL (Windows Template Library) and became frustrated. It seamed perfect, having no connection to MFC and the associated bulk of all of that overhead. But I (having no training as a programmer) became frustrated. If I knew it was worth it I would continue and struggle until I got it. If you have any advise as to the best plan of action to become a great programmer, I would be all ears. I'm not changing careers though. I love what I do, but so much of my work is so easily handled by a computer that it kills me to do the repetitive tasks each time. If I was able to teach (program) the computer to do the repetitive tasks, I would be in heaven. Thanks for listening...er reading this.

Danny Polkinhorn
2005-10-11, 12:37 AM
Erik (I assume your name is Erik),

Your question is sort of like "What pencil should I draw with?" It's too open-ended. If you could give some insight into your skill level, what type of applications you are developing, what do you see yourself doing 5 years from now, then Fedor and others would have a better idea of suggestions.

So if you want to work for Autodesk developing Revit, then a mastery of C++ (and a degree in computer science) is mandatory. If you want to develop 3rd party applications to sell, then any of the .NET languages will do, probably C# is best for you. If you want to develop applications for the internet, that's another still. Since this is a Revit group, I assume it's not the latter. Anything else probably needs more info.

Hope that helps,

erikbjur
2005-10-11, 05:37 PM
I actually don't want to make programs to sell. I just want to make programs that would help me compete against my competition. I would love to write programs that would interface with Revit. I used to write ObjectARX programs because I use to use Autocad exclusively. Now that I am on Revit, the possibilities are endless. I'm not trying to take the place of the Revit developer in any way. I'm also not trying to get a job with Autodesk or anything like that.
I know I can't expect the Developers to customize there program to my every need. Most of the time they are one or two steps ahead of me anyway. If I think I would like a change in one area or another, in the next release...there it is!
I guess over all, you have answered my question in that I would like to develop applications that could interface with Revit. I would also like to write more window applications. I guess C# is the way to go. I don't think I will forget C++ but it seams more cumbersome to develop with. Thanks for all of your help.

Danny Polkinhorn
2005-10-11, 07:27 PM
Just so you'll know what to expect...

I think you'll find that Revit's intent is to be an integrated solution for architects and engineers. They want you to have all the tools you need built in. AutoCAD is more of a development platform, or a backbone, for all sorts of applications for a variety of industries and offices. So while you were almost required to customize AutoCAD for your office, with Revit the need is much less and almost every user will be using it as is. Having said that, the power of the Revit API is really for integrating Revit with outside applications or databases, like BOM apps or structural analysis. You'll find that customizing Revit itself to do what you want it to do will be much more limiting. If that fits in with your plan, then go for it!

Hope that helps,

hand471037
2005-10-11, 09:43 PM
I actually don't want to make programs to sell. I just want to make programs that would help me compete against my competition. I would love to write programs that would interface with Revit. I used to write ObjectARX programs because I use to use Autocad exclusively. Now that I am on Revit, the possibilities are endless. I'm not trying to take the place of the Revit developer in any way. I'm also not trying to get a job with Autodesk or anything like that.
I know I can't expect the Developers to customize there program to my every need. Most of the time they are one or two steps ahead of me anyway. If I think I would like a change in one area or another, in the next release...there it is!
I guess over all, you have answered my question in that I would like to develop applications that could interface with Revit. I would also like to write more window applications. I guess C# is the way to go. I don't think I will forget C++ but it seams more cumbersome to develop with. Thanks for all of your help.

Don't count out VBA.Net.

OK, serously, once you stop laughing, it's a lot better than it used to be, it directly interfaces with the Revit.Net API, there's even code examples available on the ADN site to show you how to get started, there's a ton of free and cheap training materials out there, and there is a Free version available from MS. I don't like it either, but you should serously consiter it unless you want to pick up some C programming skills, for VBA could be easier if all you want to do is make some widgets for Revit.

Danny Polkinhorn
2005-10-11, 09:49 PM
Don't count out VBA.Net.I think you meant VB.NET, right? He mentioned that he knew C++ already, so C# is a natural choice for him.

You're right though, there are very few differences between VB.NET and C#, but for a 'purist', C# is the way to go. I've been using VB for some time now, so I'll stick with it as long as I can.

hand471037
2005-10-11, 10:31 PM
Woops. You're right, it's VB.NET. The old one was VBA. I'm obvously not a programmer. :D

For a moment there I was researching VB.NET & Revit, and it's only been due to lack of time that I haven't done anything with it yet. They (Microsoft) sure make it easy to get hooked on their development tools, and I didn't notice that the guy had C experance (just ARX) so I thought that VB.NET might be an easy way to go. Sure seemed easy to get started with.

erikbjur
2005-10-12, 04:29 PM
I just wanted to thank everyone for their imput. This forum is a jewel.

iamtristanc
2016-10-14, 02:18 AM
Hey all :D I'm in a similar position, wanting to write add-ins that automate tedious tasks.

Since some time has passed, is there any new information that can be shared on the best programming language to delve into?
And what are your thoughts on using Ruby?

I have some limited experience in programming, but was self taught and quite a while time ago! VBA mostly, and some LISP.
Thank you!