Author Topic: Has anyone attended AU class CP104-1?  (Read 10715 times)

0 Members and 1 Guest are viewing this topic.

JCTER

  • Guest
Re: Has anyone attended AU class CP104-1?
« Reply #15 on: December 09, 2009, 04:52:38 PM »
If their "more user friendly" modern scripting methods are something along the lines of the macro recorder, I think your job security will be AYYYYYYYY OKAAAY.

Bobby C. Jones

  • Swamp Rat
  • Posts: 516
  • Cry havoc and let loose the dogs of war.
Re: Has anyone attended AU class CP104-1?
« Reply #16 on: December 09, 2009, 05:03:30 PM »
If their "more user friendly" modern scripting methods are something along the lines of the macro recorder, I think your job security will be AYYYYYYYY OKAAAY.

:)  Not autodesk's scripting languages; they're talking about allowing scripting with any language that runs on the DLR, like IronPython and IronRuby.
Bobby C. Jones

JCTER

  • Guest
Re: Has anyone attended AU class CP104-1?
« Reply #17 on: December 09, 2009, 05:11:23 PM »
If their "more user friendly" modern scripting methods are something along the lines of the macro recorder, I think your job security will be AYYYYYYYY OKAAAY.

:)  Not autodesk's scripting languages; they're talking about allowing scripting with any language that runs on the DLR, like IronPython and IronRuby.

Ah, I thought one of the generic thoughts about using 'easier' language support was to allow for something else.  Nevermind.  It's good news for guys like me, though, who could never justify hiring a programmer, but could get approval to spend time doing my own customization.  It gives me more power, and doesn't take anything away from y'all's economy.

mohnston

  • Bull Frog
  • Posts: 305
  • CAD Programmer
Re: Has anyone attended AU class CP104-1?
« Reply #18 on: December 09, 2009, 06:17:08 PM »
I liked this idea better when it was called "VBA".

It seems like "they" (whoever they are) took VBA away (don't kid yourself it's going away) because it wasn't deep enough, it didn't give enough control.

Let's get in our time machine and go back 5 years:
We AutoCAD programmers were told "You need to make the change to this new .NET code. Pick your poison. VB.NET or C#.NET. We're not going to lie, it's going to sting a bit. But in the long run you'll be glad you learned all about DocumentLocks and Transactions and ResultBuffers and Delegates and Interfaces and PolymorphineInjections . . ."

Fast forward to today:
"These languages are too complicated. They take too many lines of code and they aren't very easy to read so here's what we're going to do for you. We're going to let you write code that is simpler, more logical without all the complexity. Look how great it is to write simple code to get your work done! . . . You are welcome!"

So we have C++, C#, VB.NET, F#, IronPython, IronRuby, Boo (I'm not making that last one up) and who knows what else.

With all these new choices in programming languages will support be easier or harder to get?
Will examples be more plentiful or more scarce?
Will you really be able to produce better tools quicker or will you be spending your time learning new languages?
By the way what help will developers get when it comes to debugging these new languages? Remember the help AutoLISP gave you when it broke?

Prediction: In 3 years we will have VBA back. It won't be called VBA and it won't be built on the same platform as todays VBA. But it will be a relatively easy interface that let's the AutoCAD programmer create quick, friendly, powerful programs without the overhead of Visual Studio.

And we will have to learn a new language to use it.


It's tied in with the whole idea of "frameworks".

Basically, what's happened for a long time (since C became popular) is for people to have "class libraries".  This is where people would typically put all the common stuff - you know, the basic routines that people use all the time, and don't want to rewrite all the time.  Then the typical way to create an application was to start writing code that calls the routines in these "class libraries".

Along the way, it became apparent to some that we were still rewriting a lot of the same code over and over again.  So they got the idea to try and include EVERYTHING that we write all the time in a "framework".  As opposed to having a class library full of routines that get called by our application, we have a framework that contains all the common components of an application.  Then we only write the parts that are different from other applications.  We actually start an application by simply instantiating an "Application" class (or a subclass of an "Application" class).  Then this "Application" class has a bunch of hooks (i.e., events and delegates), which allow us to add our custom pieces.  Net result is we can build a better application faster.

In other words, instead of creating a bunch of custom code that makes a bunch of calls to a "Class Library", we have a framework that makes a bunch of calls to our custom code.  In many respects, it's the mirror-image approach to what we did in C.

When we start looking at things this way, then most of the time, all we need to do is specify little pieces of high-level logic.  Everything else is done by the framework.  So we actually aren't losing anything as programmers.  By contrast, we're gaining, and we can concentrate only on the important logic of our application.  All of (or at least most of) the "grungy details" are taken care of in the framework.

Now of course, not EVERYTHING can be done via a high-level approach.  So we might still find ourselves breaking out chunks for implementation in some lower-level language, such as C++ or (in very rare cases) even Assembly.   But for most application programming, this approach yields FAR better results, FAR quicker, than attempting to do everything via a low-level approach.
It's amazing what you can do when you don't know what you can't do.
CAD Programming Solutions

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8698
  • AKA Daniel
Re: Has anyone attended AU class CP104-1?
« Reply #19 on: December 09, 2009, 06:27:01 PM »
Quote
PolymorphineInjections

 :lmao:

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Has anyone attended AU class CP104-1?
« Reply #20 on: December 09, 2009, 06:28:56 PM »
< .. >
But it will be a relatively easy interface that let's the AutoCAD programmer create quick, friendly, powerful programs without the overhead of Visual Studio.


 :angel:

Yep. Visual Lisp 

:lol:
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

dgorsman

  • Water Moccasin
  • Posts: 2437
Re: Has anyone attended AU class CP104-1?
« Reply #21 on: December 09, 2009, 07:09:27 PM »
< .. >
But it will be a relatively easy interface that let's the AutoCAD programmer create quick, friendly, powerful programs without the overhead of Visual Studio.


 :angel:

Yep. Visual Lisp 

:lol:

Hah!  After the dental appointment today, I needed that.

There is a great need for something that can do "more" than LISP but is faster and easier for CAD Admins to work with than C#/VB.  As long as it doesn't turn out like the action recorder, I'm all for it.
If you are going to fly by the seat of your pants, expect friction burns.

try {GreatPower;}
   catch (notResponsible)
      {NextTime(PlanAhead);}
   finally
      {MasterBasics;}

Arizona

  • Guest
Re: Has anyone attended AU class CP104-1?
« Reply #22 on: December 10, 2009, 06:50:08 AM »
Do you mean to tell me that I was sitting in a room with a bunch of fellow swampers and didn't know it?
Yes :-)

Side question: If you already had programs in VBA and was going to move these forward, as well as consider future programs, would you upgrade what you have to VB.net and continue writing in VB.net or would you move toward C#?
Which one do you see as having some longevity over the other?

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Has anyone attended AU class CP104-1?
« Reply #23 on: December 10, 2009, 07:14:11 AM »

I'm prejudiced 'cause I dislike VB ...

BUT,

I don't think it matters ..  whichever you feel comfortable with. Just keep in mind that the differences between vb/vba and vb.NET are sufficient to cause a little confusion for anyone not prepared to put in the work required to learn.

also ... Microsoft have committed to develop both languages simultaneously IE: any new features will go into BOTH languages unlike the prior situation where each languages features depended in some part on the team that was working on it.

I believe code samples available in c# are currently 'better' than vb.net ... this is in part due to 'translations' from vba.

 
//--
added: one of the things I like about c# is that the formatting and structure using braces for code blocks lets me breathe when reading code ... with vb I can't visually breathe 'cause my eyes can't find a place to pause and assimilate what I've read. This is important to me 'cause more time is spent reading code that writing it.

In good faith
Kerry
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

SomeCallMeDave

  • Guest
Re: Has anyone attended AU class CP104-1?
« Reply #24 on: December 10, 2009, 08:07:03 AM »
.... as a cad manager I would LOVE to bang out some simple scripts in something more modern than autolisp. .....

I thought the same thing.  I have done a bit of work with IronRuby,  writing some helpers and wrappers for the AutoCAD .Net API and I love it. 


If anyone is interested, you can take a look at my github account http://github.com/davidbl/acadhelper\ for the code (see the wiki pages) and my blog http://blog.davidkblackmon.com/  for some more examples.

Using Ruby, an AutoCAD developer has access to a huge library of code via RubyGems.  Just about anything you that you might need is already available as a gem.   Plus Ruby gives an easy way to connect web applications to AutoCAD using Rails/ActiveRecord. (I sure it would be similar for Python too)




David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4075
Re: Has anyone attended AU class CP104-1?
« Reply #25 on: December 10, 2009, 10:42:38 AM »
I agree with Kerry on the reading/pausing.  I hadn't thought of it like that, but seeing segments is definitely easier
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

Arizona

  • Guest
Re: Has anyone attended AU class CP104-1?
« Reply #26 on: December 10, 2009, 01:05:00 PM »
Thanks for the feedback!
I'm sure I'll be asking lots of questions once I get past the stupid questions stage  :-)

mohnston

  • Bull Frog
  • Posts: 305
  • CAD Programmer
Re: Has anyone attended AU class CP104-1?
« Reply #27 on: December 10, 2009, 01:31:34 PM »
< .. >
But it will be a relatively easy interface that let's the AutoCAD programmer create quick, friendly, powerful programs without the overhead of Visual Studio.


 :angel:

Yep. Visual Lisp 

:lol:
You have a sick sense of humor.  :ugly:
It's amazing what you can do when you don't know what you can't do.
CAD Programming Solutions

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8698
  • AKA Daniel
Re: Has anyone attended AU class CP104-1?
« Reply #28 on: December 10, 2009, 06:07:30 PM »
It's the API, not the language. If your needing to bang out a quick app in C#, you can always use the ActiveX API.
If you don't want to party with transactions, BlockTableRecords...etc then don't

Code: [Select]
[CommandMethod("doit")]
  static public void doit()
  {
   AcadApplication app = AcAp.Application.AcadApplication as AcadApplication;
   app.ActiveDocument.ModelSpace.AddLine(new Point3d(0,0,0).ToArray(),
                                         new Point3d(10,10,0).ToArray());
  }

Easy as VB  :lol:

MickD

  • King Gator
  • Posts: 3636
  • (x-in)->[process]->(y-out) ... simples!
Re: Has anyone attended AU class CP104-1?
« Reply #29 on: December 10, 2009, 06:30:33 PM »

With all these new choices in programming languages will support be easier or harder to get?
Will examples be more plentiful or more scarce?
Will you really be able to produce better tools quicker or will you be spending your time learning new languages?
By the way what help will developers get when it comes to debugging these new languages? Remember the help AutoLISP gave you when it broke?


Support etc. won't be as bad as you might think, all these new scripting type languages target the DLR, this means you can call iron ruby with vb.net or whatever, it's basically like one language with many syntaxes/styles of coding if you like.

Personally I think IronPython would be the easiest to learn and use and would be very quick to build app's with with IronRuby a close second but everyone is different so pick your poison, it all runs in the same engine.

If you could debug ironpython using VS in acad I would very rarely write code in another language again, it's that easy to read and use.
"Programming is really just the mundane aspect of expressing a solution to a problem."
- John Carmack

"Short cuts make long delays,' argued Pippin.”
- J.R.R. Tolkien