The AutoCADET's Guide to Visual LISP: Optimize and Customize Your AutoCAD Design Environment

Chapter 14: Saving and Sharing Data

Your applications will probably require data that extends beyond the basic geometry available in AutoCAD drawings. In addition, you will probably need to preserve some data between multiple drawing edit sessions. The normal operation of a Visual LISP program is to be loaded and then evaluated. When the evaluation is finished, data may be left in global variables that can be accessed immediately when the program is restarted.

But what happens to global data when a drawing is closed? In this chapter, you look at that situation and learn ways in which you can preserve data in a drawing to use in a later run of the same program with the same drawing. Data can be stashed away in several different places in a drawing, and each has its advantages and disadvantages.

Application Exposure

An application tied to a drawing most likely needs to store data associated with the drawing. For example, suppose that you have an application involving components with parameters. In many cases, you can use blocks with attributes to carry the parameters.

But what are your options when a block is not suitable, such as when you are using polylines to define a path. As is typical of Visual LISP, you have several options. The option you choose depends on how exposed you want your application to other applications and AutoCAD operators. An application is considered exposed if entities and data can be manipulated outside the program using other tools.

Most Visual LISP applications that rely on...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Drawing Software
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.