Visual LISP: Entity properties and methods



Author Muharrem Koçyiğit
Profession Mechanical Technician
  AutoCAD & Prosteel Specialist
Location Germany
e-mail  

All Visual LISP versions

Hello everybody,

In my previous article I tried to explain the Difference between AutoLISP and VisualLISP, by giving some example functions. In today’s example, I will show you more clearly how to create applications by using properties and methods of entities easily and quickly. In Visual LISP programming language, property of entities is called property and its sub-programs are called method.

You can learn all of the information related to the entity by using VLAX-Dump-Object command. VList (Code.1) function given below accepts entity or vla-object data type and shows properties of the entity that is selected on the screen.

Fig.1
Code.1 – Function that does the job of listing: “(VList obj)“.

By “C:Test” (Code.2) in the main function, you can see what kind of a VLA-OBJECT data type the selected entity is converted into. This operation is performed by

vlax-ename->vla-object

command. In Visual LISP, you have to make this data type conversion!

Fig.2
Code.2 – Main function “C:Test“.

In AutoLisp, entget function accepts ENAME data type and generates a DXF list as shown in Listing. 1. 

Fig.3
Listing.1 – Results obtained by entget function of AutoLisp.

In Listing. 2, you can see what kind of methods and properties a CIRCLE entity has (vla-object). I will explain how to use the methods and where to get the explanation related to these in my next article.

Fig.4
Listing.2 – Information generated by vlax-dump-object function.

Goodbye, 

You can download the file from here.

Technorati Tags: , , , ,

Bu yazinin Turkce’sini okumak icin tiklayiniz.

Similar Posts

Rate this article:

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5 out of 5)
Loading ... Loading ...

5 Responses to “Visual LISP: Entity properties and methods

  • 1
    Siddu
    July 14th, 2007 15:27

    dear sir,
    what is difference between VLAX & DXF?

  • 2
    Vagia
    September 10th, 2007 14:20

    Hello.
    My name is Vagia. I want to start visual lisp lessons.
    Please can you tell me something about that. From where can i start?
    Thank You.

  • 3
    Pooyan
    November 20th, 2007 23:12

    Hello
    I want to know the version of Visual LISP in AutoCAD 2008 and other version of AutoCADs if avilable?
    Best Regards
    Pooyan TT

  • 4
    Orhan Toker
    November 21st, 2007 09:58

    Hello Pooyan,

    We’re assuming that Visual LISP versions as AutoCAD versions. But i don’t really now what are the differences between 2008 and older versions of Visual LISP. I think only vla- and vlax- function may differ. Please check vla- and vlax- functions list in Visual LISP reference that you can find in Visual LISP help file.

  • 5
    Lukas
    December 12th, 2007 21:54

    Hello.
    Is there any way to get the coords of a solid’s vertexes? And to change those coords using Visual LISP functions? Something like editing the vertex positiong with a ctrl+click and draging, but without using the mouse :) The “VLAX-Dump-Object” command doesn’t give any information about vertexes :/
    Regards
    Lukas Klama

Leave a Reply