Jump to content

Autolisp vs Modern API's


samifox

Recommended Posts

Since LEE MAC (my LISP Messiah) said: POST #16

 

im wondered about the path I’ve chosen. I know all the learing curves available but ive choose autolisp because it doesn’t need to be compiled , so scipts can be written on the go.

 

Now I ask myself, why should I use the most primitive language in planet if I can jump straight to modern API like ObjectARX or .NET?

Did you ask yourself that question?

Link to comment
Share on other sites

#1 Autolisp is not a primitive by any means.

 

#2 Today's greatest turns into garbage very quickly Fortran Pascal Basic VBasic were all the 'greatest'

 

#3 Return on Investment? It's not even close. It's not even comparable.

Link to comment
Share on other sites

#1 Autolisp is not a primitive by any means.

 

#2 Today's greatest turns into garbage very quickly Fortran Pascal Basic VBasic were all the 'greatest'

 

#3 Return on Investment? It's not even close. It's not even comparable.

 

#1 how would one define a language being premetive or not as you see it?

 

#2 ?

 

#3 ?

Link to comment
Share on other sites

Since LEE MAC (my LISP Messiah) said: POST #16

 

im wondered about the path I’ve chosen. I know all the learing curves available but ive choose autolisp because it doesn’t need to be compiled , so scipts can be written on the go.

 

Now I ask myself, why should I use the most primitive language in planet if I can jump straight to modern API like ObjectARX or .NET?

Did you ask yourself that question?

 

I understand where you're coming from, but feel that you may have unintentionally misunderstood some context, and the intent behind AutoCAD's APIs... Each having its own capabilities, rules, areas of overlap, and even trade-offs... The reason for so many APIs is that there is no one-size fits all. In order to resolve which path you should be on, look closely at what your development goals are.

 

There's a recent series of DevBlog articles that you may find interesting, entitled The Right Tools For The Job.

 

Not so long ago, I started with basic button macros, and then AutoLISP. From there, I quickly grew to use Visual LISP (ActiveX COM). Despite VBA also being an ActiveX COM API, which would seem to be the next logical step for its inherent Forms functionality (rather than learning DCL), I instead jumped to .NET API. I initially started with VB.NET as I felt that it was more 'readable', like my Visual LISP code, and slowly began learning C#.NET (same API as VB.NET, different language syntax), and haven't looked back... Now, 100% of my Autodesk Exchange Apps are coded in C#.

 

My reason for progressing into .NET was very simple; I wanted to access AutoCAD and Civil 3D API Features that were not exposed to LISP.

 

I still use LISP daily for CAD production, and often hop into VLIDE in order to 'write a script on the go'... I only hop into Visual Studio (a .NET IDE) for larger tasks, especially those intended for either expanding AutoCAD's functionality to do something it doesn't do today, or for extremely intensive tasks that even with efficiently written LISP code might take several minutes, as .NET API is inherently faster.

 

... My $0.02

 

 

 

Cheers

Link to comment
Share on other sites

I understand where you're coming from, but feel that you may have unintentionally misunderstood some context, and the intent behind AutoCAD's APIs... Each having its own capabilities, rules, areas of overlap, and even trade-offs... The reason for so many APIs is that there is no one-size fits all. In order to resolve which path you should be on, look closely at what your development goals are.

 

There's a recent series of DevBlog articles that you may find interesting, entitled The Right Tools For The Job.

 

Not so long ago, I started with basic button macros, and then AutoLISP. From there, I quickly grew to use Visual LISP (ActiveX COM). Despite VBA also being an ActiveX COM API, which would seem to be the next logical step for its inherent Forms functionality (rather than learning DCL), I instead jumped to .NET API. I initially started with VB.NET as I felt that it was more 'readable', like my Visual LISP code, and slowly began learning C#.NET (same API as VB.NET, different language syntax), and haven't looked back... Now, 100% of my Autodesk Exchange Apps are coded in C#.

 

My reason for progressing into .NET was very simple; I wanted to access AutoCAD and Civil 3D API Features that were not exposed to LISP.

 

I still use LISP daily for CAD production, and often hop into VLIDE in order to 'write a script on the go'... I only hop into Visual Studio (a .NET IDE) for larger tasks, especially those intended for either expanding AutoCAD's functionality to do something it doesn't do today, or for extremely intensive tasks that even with efficiently written LISP code might take several minutes, as .NET API is inherently faster.

 

... My $0.02

 

 

 

Cheers

 

i understand how one API is better than the other one to accomplishes some tasks, but when we talk about Autolisp there is a feeling it was the defult option for many years until VisualLisp, VBA,etc.

 

i also acknowledge the benefit of writing daily routinewith autolisp without the tedious process of compiling and interfacing with different environment.

so what you actually say is that Autolisp is vital first step before learning something more demanding like modern API.? It’s not a plus, it’s the ground for programming autocad.?

 

wonder about the things autolisp isn’t exposed to? i thought visualisp can access everything in the model tree, isnt it?

 

Shay

Link to comment
Share on other sites

Yes visual lisp can access the AUTOCAD model, but C#.NET code can access more than just AutoCAD items.

For instance, you can right click inside of autocad and it will bring a shortcut menu up.

Lisp has no ways to easily add items to this right-click-shortcut-menu that I am aware of.

However, C#.NET code can add items into this shortcut menu, as BlackBox has shown with some of his applications. Aptly named "Right-click-XXXXX" :)

This is just one example but I think it sufficiently explains what BB was stating, practically.

If you are just concerned with making autocad a better program than autolisp is not the *best* (because that is completely based on your preference) but autoLISP is totally capable of accomplishing most tasks that a human would do manually, except it would be ALOT faster. That is one of the beautiful things about autolisp in fact, that every function is contained within a premise that the function will in effect act as "shortcuts" to obtaining data manually.

 

So, to me- and this is why I jumped into lisp , and have stayed there (for now and the foreseeable future) is because there is ALOT to learn with autolisp, ESPECIALLY since I had little to no coding experience in any language before starting with autolisp. Syntax, structure, functions, parenthesis matching, variables, etc were all brand new information for my brain to soak up. There is still a lot to be learned, even though today I would consider myself a competent autolisp coder. My company sure believes that to be the case, and I am excited to think of gaining more experience in LISP because it will have a huge effect on my career and incidentally my life. The limits are simply up to me, which way I personally want to go.

 

But I know that I will be with autolisp for many more years because it can do everything that my company and I require- the moment that an issue arises that autolisp is not capable of handling effectively, then that's when I would only consider looking into another language. Two common sayings come to mind here. "If it ain't broke, don't fix it." and "I'll cross that bridge when I get to it", meaning that for now, it's best to just keep improving autoLISP because it would be foolish to stop using what I've already learned and re-start the whole learning curve again, for what purpose? To say that I'm cool and code in the newest language that may become obsolete in the next few years (as David Bethel mentioned earlier)? Not a chance I'd want to take, considering that LISP didn't spite me. It hasn't failed in anything I've required it for....and it's a knowledge hub. These forums, the code itself, and autocad- surely that is enough to keep you busy, it's kept persons like Lee Mac busy!

 

I understand blackbox's choices and reasoning though and I don't believe them to contradict anything I've said here at all. To me it simply speaks of different preference, different needs. BB has recently (or not so recently) learned to code apps in .NET that he can put onto the autodesk website and receive compensation for his hard work, he's created (or stepped into) a niche that is open to all of us if we so choose to take that step.

 

But for me, I'm going to keep going so I can get past "competent" and achieve "MACSTER" status with autoLISP, vanilla and visual. (see what I did there?)

 

 

p.s. sorry for making this mememe, iii, but my time on these forums isn't great enough to speak for anyone other than myself

Edited by Bhull1985
formatting. boobs.
Link to comment
Share on other sites

i understand how one API is better than the other one to accomplishes some tasks, but when we talk about Autolisp there is a feeling it was the defult option for many years until VisualLisp, VBA,etc.

 

i also acknowledge the benefit of writing daily routinewith autolisp without the tedious process of compiling and interfacing with different environment.

so what you actually say is that Autolisp is vital first step before learning something more demanding like modern API.? It’s not a plus, it’s the ground for programming autocad.?

 

I think we share a similar perspective on LISP, but I would instead say that LISP is merely a popular entry point into AutoCAD development (and for good reasons)... LISP may not be vital, nor default, but it certainly has been an integral part of my own understanding of the AutoCAD Object Model, simply by definition of LISP being a document level language.

 

Two common paths are, 1) the CAD production user that learns to automate tasks, etc. in order to be more productive (this is my own path), and then 2) a formal developer, who is now starting to code for AutoCAD products.

 

For the former, it may take a great deal of time to even grasp development concepts such as Objects, Properties, Methods, and Events before such can have a profound affect on one's productivity. It all depends on the person, their aptitude for learning new things, and there is a great deal to be said for the quality of one's mentors. Particularly in the realm of LISP, we are a blessed community to have such mentors.

 

The latter, however, tend to already have a firm grasp on upper level development concepts, Classes/Types, casting, Transactions, Exception and Event handling, etc. but still need to learn the AutoCAD Object Model.

 

My learning .NET was purely out of the interest of curiosity... I was so new to development in general, and previously unaware that I even had an aptitude for it at all, that I pursued other languages simply for the sake of testing my own limits. Learning multiple languages has only affirmed my appreciation for the elegance of LISP, and further benefited both my daily production, and my ability to offer creative innovations otherwise. I am no expert, but I would not give up either API, frankly, as learning to employ each at the appropriate time, effectively has a force-multiplying effect (i.e., using .NET to expand the LISP API, etc.). offering some of my work at Autodesk Exchange is merely another layer of self-examination to the onion, as it were, and I am very fortunate to have been given an opportunity to help others in the process.

 

Again, each has their own trade-offs, and can serve a particular purpose... Clearly identifying what serves your needs most effectively, is your task. Don't forget that there's value in choosing something that interests you. :thumbsup:

 

 

wonder about the things autolisp isn’t exposed to? i thought visualisp can access everything in the model tree, isnt it?

 

There is a great many API Features that have not been exposed to even Visual LISP; but then again, not everything is exposed to even the .NET API, hence DllImport, PInvoke, etc. :thumbsup:

Link to comment
Share on other sites

Primitive:

 

Synonyms

1, 2. prehistoric, primal, primary, primordial, original, aboriginal, antediluvian

 

While being based on an old platform, there only a few enhancements that cannot be made via a roll your own function.

 

 

 

For language primitives:

 

http://en.wikipedia.org/wiki/Language_primitive

 

Assembly language would fall into this catagory

 

 

As to high level programming:

 

http://en.wikipedia.org/wiki/High-level_programming_language

 

At 1 time could control heap and stack space in Autolisp. Not any longer.

Link to comment
Share on other sites

lets face it guys, we all have the same nasty fantasy, come to work at least 4 hours after everybody else, drink your first coffee, have autocad to draft, calculate,publish, plots and email them for you, and all of this in less than 15 minutes, than you get up of the chair, say to your boss, have a nice day sir, go to your home, play with your baby, and live happy ever after,

 

now...who said im dreaming? :twisted:

Link to comment
Share on other sites

Have you been watching me at work ? The baby excuse is a bit hard now she is 21.

 

My $0.05

 

A simple question draw a rectang using lisp a few lines, .net add even more lines, compile it then run, which way was easier ? I endorse depends on the task, 50,00 points do something .net will probably do way better.

 

Can you write .net at command line and run ? Or a quick hack using copy and paste for a few lines of code.

Link to comment
Share on other sites

Have you been watching me at work ? The baby excuse is a bit hard now she is 21.

 

My $0.05

 

A simple question draw a rectang using lisp a few lines, .net add even more lines, compile it then run, which way was easier ? I endorse depends on the task, 50,00 points do something .net will probably do way better.

 

Can you write .net at command line and run ? Or a quick hack using copy and paste for a few lines of code.

 

hi

 

my baby is 2...so when she turn to 21 il be 56...wonder if human still exist by than....:rofl:

 

about the rest....you didnt read all thread.:nono:

 

what is 0.05$?

Link to comment
Share on other sites

Can you write .net at command line and run ? Or a quick hack using copy and paste for a few lines of code.

 

A couple of comments 30+ years with lisp ex Autocad sales agent exposure C# & .net. Always learning.

 

What I was getting at here I actually did the other day needed to do something and cut and pasted 6 lines of modified lisp code to complete task. Using .net open my VS cut paste compile then run. A simple task just needed a simple very temporary solution. VL has done everything I need to do within CIV3d, when looking at our civ3d add on you can sees why they use .Net the auto dynamic updating of multiple windows no way in lisp.

Link to comment
Share on other sites

A couple of comments 30+ years with lisp ex Autocad sales agent exposure C# & .net. Always learning..

 

didnt understand, can your rreprahse please?

 

What I was getting at here I actually did the other day needed to do something and cut and pasted 6 lines of modified lisp code to complete task. Using .net open my VS cut paste compile then run. A simple task just needed a simple very temporary solution. VL has done everything I need to do within CIV3d, when looking at our civ3d add on you can sees why they use .Net the auto dynamic updating of multiple windows no way in lisp.

 

so my op question or wonder wasnt comperable, lisp and .NET arent comperable. API's are ment to the long run tasks

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...