Code Samples

Code Samples

Anonymous
Not applicable
794 Views
5 Replies
Message 1 of 6

Code Samples

Anonymous
Not applicable
We're considering creating a plugin for Revit, but still at this point trying to figure out if it's feasible and if it's a project that we can take on. So at this point, I'm not ready to join ADN, but I have a couple of questions.

1) I watched a recorded webcast from earlier this year which suggested that the preferred language for programming with the API was C#, is this true, and if so why?

2) Where can I a code sample for a plug-in outside of the ADN? I am a programmer, I just don't know any of the .NET languages (though I have programmed in VBScript and JScript for some ASP websites before .NET was around), so I'm kind of looking for a complete code sample that is ready to compile and use. That would help me learn one of the languages itself, as well has how to work with the API.
0 Likes
795 Views
5 Replies
Replies (5)
Message 2 of 6

Anonymous
Not applicable
PiercedMedia wrote:
> We're considering creating a plugin for Revit, but still at this point trying to figure out if it's feasible and if it's a project that we can take on. So at this point, I'm not ready to join ADN, but I have a couple of questions.
>
> 1) I watched a recorded webcast from earlier this year which suggested that the preferred language for programming with the API was C#, is this true, and if so why?

It doesn't need to be c#, almost any .NET language will do. Most Autodesk API
samples are written in c#, perhaps that's why they suggested c#.
>
> 2) Where can I a code sample for a plug-in outside of the ADN? I am a programmer, I just don't know any of the .NET languages (though I have programmed in VBScript and JScript for some ASP websites before .NET was around), so I'm kind of looking for a complete code sample that is ready to compile and use. That would help me learn one of the languages itself, as well has how to work with the API.

Download a 30 day demo of Revit building 9.1 or Revit structure 4 and the API
samples here:

http://usa.autodesk.com/adsk/servlet/index?siteID=123112&id=2484975

Guy
0 Likes
Message 3 of 6

Anonymous
Not applicable
Trying to code using OOP, the .NET Framework and a vendor's proprietary API
which requires understanding COM while coming to the party with a background
in VBScript is not too different then expecting to be allowed into one of
those exclusive clubs like Studio 54 by showing up at the door wearing old
faded blue jeans and a t-shirt.

<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/
MAP http://wikimapia.org/#y=43038073&x=-88043838&z=17&l=0&m=h


"Guy Robinson" wrote in message
news:[email protected]...
PiercedMedia wrote:
> We're considering creating a plugin for Revit, but still at this point
> trying to figure out if it's feasible and if it's a project that we can
> take on. So at this point, I'm not ready to join ADN, but I have a couple
> of questions.
>
> 1) I watched a recorded webcast from earlier this year which suggested
> that the preferred language for programming with the API was C#, is this
> true, and if so why?

It doesn't need to be c#, almost any .NET language will do. Most Autodesk
API
samples are written in c#, perhaps that's why they suggested c#.
>
> 2) Where can I a code sample for a plug-in outside of the ADN? I am a
> programmer, I just don't know any of the .NET languages (though I have
> programmed in VBScript and JScript for some ASP websites before .NET was
> around), so I'm kind of looking for a complete code sample that is ready
> to compile and use. That would help me learn one of the languages itself,
> as well has how to work with the API.

Download a 30 day demo of Revit building 9.1 or Revit structure 4 and the
API
samples here:

http://usa.autodesk.com/adsk/servlet/index?siteID=123112&id=2484975

Guy
0 Likes
Message 4 of 6

Anonymous
Not applicable
clintonG wrote:
> Trying to code using OOP, the .NET Framework and a vendor's proprietary API
> which requires understanding COM while coming to the party with a background
> in VBScript is not too different then expecting to be allowed into one of
> those exclusive clubs like Studio 54 by showing up at the door wearing old
> faded blue jeans and a t-shirt.

Yes but if you're Brad Pitt they'd let you in 🙂

> <%= Clinton Gallagher
> NET csgallagher AT metromilwaukee.com
> URL http://clintongallagher.metromilwaukee.com/
> MAP http://wikimapia.org/#y=43038073&x=-88043838&z=17&l=0&m=h
>
>
> "Guy Robinson" wrote in message
> news:[email protected]...
> PiercedMedia wrote:
>> We're considering creating a plugin for Revit, but still at this point
>> trying to figure out if it's feasible and if it's a project that we can
>> take on. So at this point, I'm not ready to join ADN, but I have a couple
>> of questions.
>>
>> 1) I watched a recorded webcast from earlier this year which suggested
>> that the preferred language for programming with the API was C#, is this
>> true, and if so why?
>
> It doesn't need to be c#, almost any .NET language will do. Most Autodesk
> API
> samples are written in c#, perhaps that's why they suggested c#.
>> 2) Where can I a code sample for a plug-in outside of the ADN? I am a
>> programmer, I just don't know any of the .NET languages (though I have
>> programmed in VBScript and JScript for some ASP websites before .NET was
>> around), so I'm kind of looking for a complete code sample that is ready
>> to compile and use. That would help me learn one of the languages itself,
>> as well has how to work with the API.
>
> Download a 30 day demo of Revit building 9.1 or Revit structure 4 and the
> API
> samples here:
>
> http://usa.autodesk.com/adsk/servlet/index?siteID=123112&id=2484975
>
> Guy
0 Likes
Message 5 of 6

Anonymous
Not applicable
Yes, I realize that it's an up hill battle, but that's never stopped me before. I learn best when I have a nice challenge in front of me...especially programming languages. That's the way God made me I guess. I want to learn a new language so this is my challenge.

Needed to learn PHP a few years back and had a challenge to take on it order to learn it....that challenge was RevitCity.com and that seems to have turned out alright so far.

I've been studying the last couple of weeks, and I'll admit that OOP is a little different that what I'm used to (though PHP 5 is more OO than previous versions), and while some of the concepts are still a little hard for me, I think I'm starting to grasp most of it.

I am focusing my efforts on C#, so if you know of any great resources on the net for learning, I'd love to have your suggestions.
0 Likes
Message 6 of 6

Anonymous
Not applicable
Hey, by all means read the code and then read more of it. You already
understand that. Its going to take you about a year and maybe more to really
grasp OOP and more time to really master OOP and the .NET Framework. This is
a widely held consensus that has proven to be right on the money for
scripters stepping up to OOP. What you'll be doing in the meantime is
writing code as if your were scripting which is very common and causes
developers to think they got a handle on it because the page will compile.
:-)

Choosing C# is a wise move. Everything new coming out of Microsoft labs is
done with C#. Furthermore, syntax and grammar for C#, Javascript, and Java
are all nearly identical so you won't get VB vapor-brain when it comes to
client-side coding. You can even code on Linux using C# skills. Igo nowhere
without a book to read. Just this morning while sitting in a waiting room I
read 5 (short) chapters of Java code that I will be able to replicate using
C#. Throw yourself a party for making the right choice of languages.

I used a Deitel and Deitel textbook to learn the language of C# which I
recommend before starting the framework and then we all use many books, the
web and the newsgroups to learn OOP and I'd say I'm still only half way
there. The DNF is a collection of thousands of classes. You have to master
class design to master OOP. Class design is basic and fundamental. So the
first book I'd recommend to begin learning the framework would be "C# Class
Design Handbook" published by Wrox. See you in a year or so 🙂


<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/
MAP http://wikimapia.org/#y=43038073&x=-88043838&z=17&l=0&m=h



wrote in message news:[email protected]...
Yes, I realize that it's an up hill battle, but that's never stopped me
before. I learn best when I have a nice challenge in front of
me...especially programming languages. That's the way God made me I guess. I
want to learn a new language so this is my challenge.

Needed to learn PHP a few years back and had a challenge to take on it order
to learn it....that challenge was RevitCity.com and that seems to have
turned out alright so far.

I've been studying the last couple of weeks, and I'll admit that OOP is a
little different that what I'm used to (though PHP 5 is more OO than
previous versions), and while some of the concepts are still a little hard
for me, I think I'm starting to grasp most of it.

I am focusing my efforts on C#, so if you know of any great resources on the
net for learning, I'd love to have your suggestions.
0 Likes