Difference between AutoLISP and VisualLISP
Print This Post
![]() |
Author | Muharrem Koçyiğit |
| Profession | Mechanical Technician | |
| AutoCAD & Prosteel Specialist | ||
| Location | Germany | |
General programming info
Hello DailyAutoCAD readers,
In my today’s article, I will explain the difference between AutoLISP and VisualLISP. VisualLISP, which is available since AutoCAD version R14, has provided many uses .
In order for you to understand the difference in a better way, I will gice two different programs below. One of them is C:F1 and the other one is C:F2 function (Code.3). Both of their functionalities are the same: they will give red color property to any entity you select in the drawing area.
It is obvious that sub program “Change-Color-F1” (Code.1) that is used by the C:F1 function is much more complicated. If you want to make changes over entities in AutoLISP, than you have to have the DXF information.
Visual Lisp / ActiveX programming method requires experience, however, if you want to make changes over an entity, it is easier to use the functions (methods) that belong to that entity. Thus, in order to make changes in the color, you should use vla-put-color method. There is no need for a superior english knowledge, methods are already given meaningful names.
Name of ActiveX, which has been released by Microsoft for VBA applications, is always used in VisualLISP programming language, because its principles are based on VBA.

Code.1 – LISP function “Change-Color-F1“, which works with DXF.

Code.2 - Active-X Function “Change-Color-F2“.

Code.3 – Main functions “C:F1” and “C:F2“.
Have a nice day. File for the example given in this article: compare-lisp-func.lsp.
Bu yazinin Turkce’sini okumak icin basiniz.
Similar Posts
Rate this article:


March 25th, 2007 10:51
Hi,
would you tell mi how to create render material with visual lisp in Autocad 2007 or 2008?
April 26th, 2007 15:54
Dear sir
I am Sudanese ,PhD. student ,my research in the field of computer aided casting design so I want to build software using autocad and visual basic please help and advise me
thank you
Adil
April 27th, 2007 20:57
Hello Adil,
what for question have you? I have good knowledge of Visual Lisp. I should like to advise …
June 9th, 2007 19:00
Hi
I haved developed a lisp for extracting text values to a .dat file in just one command. Please mail me if anybody requires this Autolisp Program.
June 18th, 2007 10:57
Hello Sir,
I am doing a project using vlisp, if u have any dcl files conatining menus and text boxes please mail me as examples.
thanking you sir
with regards
Ramesh
January 23rd, 2008 14:06
Hi I did like to write a vba program that extract ceritan attubute data out of a drawing or drawings and imports them to excel I can do it with eattext command all the time but then I have to create my own headers and titles in excell all the time.
February 6th, 2008 19:06
how to find point intersection between circle with circle in autolisp programing?
thank you
February 8th, 2008 15:37
Hi Santo (alias wahyono)
this code is the solution …
;;;—
(vl-load-com)
;;;—
(defun UTL:GET:INTERSECT:LIST ( var / SArray n Lst RetLst pt )
(setq SArray (vlax-variant-value var ))
(setq Lst (vlax-safearray->list SArray ))
(setq n (vlax-safearray-get-l-bound SArray 1 )
RetLst ‘()
)
(while (vla-object e1 ))
(setq o2 (vlax-ename->vla-object e2 ))
(setq rv (vla-IntersectWith o1 o2 acExtendNone ) )
(if rv
(progn
(setq lst (UTL:GET:INTERSECT:LIST rv))
(setq n 0)
(foreach x lst
(mapcar ‘princ (list
“\n” (+ n 1) “. ” “INTERSCTION = ” x ” ” (type x)
))
(setq n (1+ n))
) ) )
(princ)
)
February 8th, 2008 16:30
Dear sir,
thank for your code to my solution.
i found intersection function between 2 lines only, intersect pt1a pt1b pt2a pt2b, but i am not found intersetion function between circle with circle and circle with line
for example: centerpoint1 radius1 intersection with centerpoint2 radius2 (circle with circle) and centerpoint radius intersection with startpoint endpoint (center with line)
thank you for your attention!
santo
February 10th, 2008 14:32
Dear Sir,
while (vla-object e1 ), no function definition.
Thank you!
April 13th, 2008 17:46
Thanks for this information, Please can you guide me to right book to learn Visual Lisp.
May 7th, 2008 11:31
can you please give hint how to link autocad programming with C programming language
May 23rd, 2008 02:58
I am also interested in creating render materials with visual lisp Autocad 2008 or in 2009? Anyone have any ideas?
June 26th, 2008 07:08
hi!
i need autolisp program wherein, in one autocad file (or maybe there’s a database) that contains instrument names, everytime i changed the instru names, it will automatically update also other autocad files that contain the same name.
sorry, i have no knowledge about programming,kindly explain also.
August 2nd, 2008 19:07
Hello Sir
I am very thanksfull to u if u solve my query.
I have got one drawing from our USA client. In that drawing when i click in model tab its looks normal (i.e layer colur) but when i go to layout its seems all things are black. even i select object and look in property all propertis are normal. Please explain how it works