IntelliCAD.net

The IntelliCAD Network

Hi everyone.. new to this forum
old school MEP engineer (HVAC, fire protection, plumbing & Electrical)
(i.e. - old dog trying to learn new tricks)

I have several AutoLISP files that work in AutoCAD, but only a very few work in my IntelliCAD Pro 6.5 by DP Tech or my ProgeCAD 6.4 when I try them.

My understanding is AutoCAD had a built in LISP debugger to find LISP problems.

Is there a LISP debugger add-on or stand alone for IntelliCAD that will execute line-by-line or point me to the line of code causing the error?

The IntelliCAD command/status bar or F2 Text Window doesn't give me enough specifics... just something to the effect lisp loaded & then "null function".

Also, with AutoCAD using ARX & VLX, several add-on programs that work in AutoCAD won't work in my IntelliCAD versions. Only a few developers, that I have found, are currently writing MEP software to work with IntelliCAD.

What's in the future for IntelliCAD programming? will they stay with LISP & VBA or move to VB.net, Visual LISP.. What about OpenDCL which works with AutoCAD but does not support IntelliCAD?

Thanks for your comments..

Reply to This

Replies to This Discussion

Tell me you didn't buy the $50 IntelliCAD. It is interesting you call it Pro. So how is that advanced rendering, ACIS solid modeling, raster image/vector editing going for you? Don't you love the Visual Basic programming built in to it?

I am just kidding, really. I just get so irate everytime I hear about the hong kong phooey CAD. no, no, I kid, I kid. :-)

An AutoLISP debugger is not available within IntelliCAD or from any of the members as far as I know. Back in the day, say 1989-90, I tried to build one for AutoCAD. For months I had it "just about there". Just a few conditions would not allow me to completely insert the calls for the walk through display. I kept at it until I realized that as bright as I thought I was I wasnt bright enough to solve the mystery of the bugger debugger.

So, how do you find where the error is occuring? It is not as difficult as it may seem. The down and dirty way is to simply take the first line of the lisp file and copy and paste it to the command line in progeCAD. Keep doing this line by line, answering any prompts that come up until it blows up. There, where the crater in the ground is, your error.

A little bit more time consuming but foolproof without human error is to take a statement like (princ (strcat "Line: " (= n (+ n 1)))). Now, a disclaimer, I can not guarentee any statements typed here are correct because it has been exactly 9 years, 3 months, 7 days, 15 hours and 35 minutes since I did any AutoLISP programming. Check my work or you may be debugging the debugger. What that statement is SUPPOSED to do, is to simply keep count of the number of lines that go by until the error occurs. You can then go into your lisp file and count the number of lines until voila, your error...

Lots of times programmers will set the *error* function so that you don't see error messages when AutoLISP programs bomb. You might consider going in and putting a semicolon in front of the line at the top of the file which redefines the error function. The semicolon will cause the interpreter to consider the statement a comment and not execute it. It would look something like (setq *error* nil) or something like that.

It is unfortunate that VLX was even invented, and as for ARX, it was quite calculated for Autodesk to implement that one. Custom objects that can only be read by AutoCAD, leaving customers basically held hostage for the last ten years because no other cad package would be able to read and display these "custom objects". Well, their day is coming as both the ITC and other vendors are working on or have released versions which have or will have ARX! As for visual lisp, well I hear that BricsCAD can read those files but really, with all the code dumped out on the net, why bother with VLX. Its like going out to find a song for your music library. You could download the 3 meg 128 bit song and suffer while it played, or, you can get the 192 bit song and like the quality much better! So when you see VLX, you know to nix.

Look for iCADsales.com to bring out MEP solutions soon.

Reply to This

Thanks for your reply..

Yeah I tried the DP IntelliCAD 6.5 Pro (Pro is their name.. not mine)..French company I believe?
what Visual Basic? it's non existent! it says I need to load VB6 everytime I try to load/run VBA!!..
but still.. all-in-all it's not bad for an inexpensive 2D CAD program that is compatible with AutoCAD 2000-2007 DWG drawing format that most of the AEC community uses.

I produce mainly 2D HVAC, FP & Plumbing drawings for Construction, so have little need at this time for any ACIS solids or rendering.. I'll leave that to the Manufacturing community & Architects

My ProgeCAD has a WINTOPO R2V program.. as far as converting raster images it's pretty marginal..but it works well enough I guess.. I don't have a tremendous R2V need at this time.. maybe later I'll try their Pro version

Perhaps I'm not placing your line Print statement in the correct location in my LISP program?
at beginning? end? after functions defined?

When I run from the IntelliCAD command prompt (either in or out of my LISP?) it returns bad argument type?
see below:

Command : (princ (strcat "Line: " (= n (+ n 1))))
error: bad argument type
(+ N 1)
(= N (+ N 1))
(STRCAT "Line: " (= N (+ N 1)))
(PRINC (STRCAT "Line: " (= N (+ N 1))))

in the statement, the number of parentheses look correct? do I need to define any variables? or is syntax correct?
Thanks,

Reply to This

As Scott says, there really isn’t a debugger for lisp, but f you’re looking for a good lisp editor that does parentheses checking and other goodies, you might try LispLink at http://www.caelink.com/

Personally, I haven’t been doing any programming for the Intellicads, I am waiting for V7 and IRX. I have been writing tons of goodies for Bricscad since they have better APIs, I.e support for Visual Lisp and ARX source code. BTY, I am sure it won’t be long before OpenDCL can compile on BRX

Dan

Reply to This

I am not sure about a LISP debugger for IntelliCAD. However, the future of IntelliCAD programming is DRX, which is a clone of Autodesk's ARX. DRX is far more powerful than any other current IntelliCAD API. It is due to ship with the next version of IntelliCAD, although a vendor (ZWCAD) has already been shipping a DRX compatible version for some time now.

Note: IRX (as mentioned by Daniel) is a layer that sits on top of DRX, and is specific to IntelliCAD.

Reply to This

Just like the future of AutoCAD was ARX. While that is true for big commerical software houses deelip, you show me the guy in the shop out back that programs using a $3000 glorified compiler with lots of fancy names like whoah dot net, man that sounds pretty fancy, Just kidding, kicking a guy when he's down, microsoft just laid off 5000 people. Whats that? 5000?, yep.

Here are some links to alisp debuggers you might be able to modify to work on InteliiCAD...

http://www.freecadapps.com/swdetails.php?page=category&value=UT...

The one I attached says it works on intellicad 2000 so it should work on current versions. I have NOT used it...
Attachments:

Reply to This

For those of us who are not quite up to speed on which ??X is which I provided the following link to shed some light on DRX.

Guess I had better come up to speed on some of this X rated stuff ...
... I still depend on a few essential lisp routines that I wrote back in the 90's, I was very glad to find that they work just as designed in progeCAD.

I should spend a week or two going through my Dave.lsp and discovering much of what I have forgotten by now.
Many of my routines were to expedite the numbering of attributes (bubbles etc) and set up title blocks and associated tables.
I never really got good at AutoLisp but have always really enjoyed getting them to FINALLY do something that I needed done on a routine basis. I've found the pay-off very great in this respect.

Is programming DRX at all comparable or similar to AutoLisp?
If so, perhaps I will invest any future learning curve in DRX rather than try to re-spark my lacking proficiency in AutoLisp.
If not, well, then I guess I'll have to try to teach this ol' dog some new tricks.

Dave Brownscombe
Cascade Advanced Design

Reply to This

I’ve posted a couple of DRX examples in the forums here.
One should probably have a fairly good grasp of C++ before jumping in.

Reply to This

Thanks Daniel,

I've got a few dusty C++ books that I never made it quite through ... it sounds like DRX is probably quite a bit more complex than I have the time to invest right now. A means of tailoring the CAD environment would certainly not be time wasted but for my needs, the current set of IntelliCAD tools available are very adequate. I still have an itch to dabble in some form of programming however, once bitten it's difficult to get out of your system. Maybe I'll check out a Lisp editor and cull through my old lisp routines and sharpen back up in that department.

Dave


Daniel said:
I’ve posted a couple of DRX examples in the forums here.
One should probably have a fairly good grasp of C++ before jumping in.

Reply to This

I think when Deelip was commenting on the new paradigm of programming that is coming due to the ARX like API planned for the IntelliCAD engine and saying "the future of IntelliCAD programming is DRX" he was speaking from his point of view not the point of view of an end user of CAD

I have developed in all the APIs included in IntelliCAD and had my time back in the day that I developed software in ARX inside AutoCAD. I can tell you from someone coming from a background of design before I started developing commercial software for the AutoCAD market that there are different levels of development. Some types of developing are just too complex and in depth for someone who designs or draws for a living to stop, learn, and maintain a level of knowledge that would make them proficient over time.

AutoLISP is easy. Once you wrap your head around the idea that all parentheses need to be closed by an ending parenthesis, and how the use of functions that make working with, sorting, and manipulating lists are crucial to really making powerful decision knowledge trees within your software (LISP is short for LIst PRocessor, although some would say it stands for Lost In Stupid Parenthesis) you can really create some fantastic stuff.

When I finally was dragged kicking and screaming away from AutoLISP I had created programs such as a Windsurfing Sail design program that could calculate the best shape for the airfoil of the sail, create a 2d representation of the 3d sail pattern, break the sail apart into various pieces to be sent to the mechanized cutting system that would cut each panel from fabric. The resulting panels were then sewed back together before the team riders would take the sail out to test for the day. The next day they would do it all again to test future tweaks based on windspeed, wave height, body weight of the rider, etc.

Where AutoLISP starts to break down I think is not from not being adequate, it is from the lack of an ability to stay resident within the CAD system to be able to react to things going on around it. For instance, move a line AutoLISP can't just recognize the line was move like ARX can, so performing actions on other objects based on that line moving are not possible.

However, unless you plan to make programming your career and spend an enormous amount of time focused on nothing but pointers, MFC libraries, new breakthroughs in software architecture (no, I did not say architecture software), then you should learn AutoLISP, and possibly VBA, although that's changing now too.

C sharp was supposed to be the new VBA and supposed to be easy, so said the folks from Microsoft. But it has been my experience that something easy to an eraser head at Microsoft is quite the opposite to most in the world. The geeks from Redmond create the some of the WORST application programming interfaces I have ever seen. For all the bright people they used to employ, they sure don't have a clue how to make programming accessible for the common man.

Reply to This

I agree. This "X rated" stuff may be far too complex for an end user. However, having said that I will also say that you can do wonders with LISP itself. Over a decade ago I programmed in AutoLISP for AutoCAD Release 12. I worked for company that built bus bodies. We had huge LISP programs that peeked into a FoxPro database DBF file and read the parameters of a bus body that were set up by a desginer - stuff like wheelbase, number of seats, baggage spaces, loading, etc. These LISP programs then automatically generated 2D drawings of the various assembly structures (front, left, right, read, etc.) of the bus body, and also created a BOM that was later imported into the company's ERP system.

This is the way I look at it. If you want to simply automate a task that is being done by a end user, then LISP could do most of it, and maybe even more. But if you are trying to perform memory intensive tasks involving complex mathematical calculations and iterations which use third party libraries and DLLs, then you will be better off with DRX.

Further reading: "My Affair with AutoCAD" - http://www.deelip.com/2007/08/my-affair-with-autocad.html

Reply to This

Well put Scott and Deelip, this really puts things into perspective.

In my 17 years of CAD experience I've only touched the very tip of the AutoLisp iceberg, I've always been very impressed with how powerful a tool it can be. It's saved me from some very boring, time consuming tasks not to mention tailored CAD to my specific needs ... and impressed past employers and colleagues along the way.

Re-exploring it's potential sounds not only fun but a useful tool in expediting drawing creation.
It shouldn't take as long to learn enough to be useful the second time around as it did the first.
Thanks for rekindling my thirst to get back into AutoLisp.
Now where's that good Lisp editor to keep my format nice and easy to read.

Thanks,

Dave

p.s. Hi James,
My intent was not to hi-jack your thread, but to carry on your conversation, hope you don't mind.

Reply to This

Dave Brownscombe said:
Well put Scott and Deelip, this really puts things into perspective.

In my 17 years of CAD experience I've only touched the very tip of the AutoLisp iceberg, I've always been very impressed with how powerful a tool it can be. It's saved me from some very boring, time consuming tasks not to mention tailored CAD to my specific needs ... and impressed past employers and colleagues along the way.

Re-exploring it's potential sounds not only fun but a useful tool in expediting drawing creation.
It shouldn't take as long to learn enough to be useful the second time around as it did the first.
Thanks for rekindling my thirst to get back into AutoLisp.
Now where's that good Lisp editor to keep my format nice and easy to read.

Thanks,

Dave

p.s. Hi James,
My intent was not to hi-jack your thread, but to carry on your conversation, hope you don't mind.

Reply to This

Reply to This

RSS

Badge

Loading…

© 2010   Created by Deelip Menezes.   Powered by .

Badges  |  Report an Issue  |  Terms of Service

Sign in to chat!