Auto/VisualLisp 101 – 3

In our last article we looked at how to create a function and create variables. Now let’s look at getting some user input, in this case the text objects we are going to resize. Let’s look at how to do this.

The lisp method SSGET accomplishes this. The result of SSGET (SelectionSetGET) we want to store to a variable so we would call the following:


However, since we want to just get text and mtext objects we will want to add a filter to our SSGET method. We do this by adding a filter list. The list will be made of what is called dotted pairs. Once constructed, the dotted pair will look like “(0 . “Test”). To construct a dotted pair, we use the lisp method CONS. A filter list is below.

(LIST (CONS -4 "<OR")(CONS 0 "MTEXT")(CONS 0 "TEXT")(CONS -4 "OR>"))))

So we use two new methods: LIST and CONS. This filter will only allow an Mtext OR text object.

Let’s put this all together which will create a variable called SS which will contain a selection set object.


In our next article, we will get a new size from the user to apply to the text or mtext object.

Comments are closed.