Chapters 11 and 12. Selecting and Modifying entities

Chapter 11. Selecting Entities

It will often be necessary to modify a drawing’s component entities, either graphic or those non-graphical ones related to its organization and structure. AutoCAD has many commands to perform these operations.
In them we find a similar behavior. All of them begin prompting the user for the selection of the objects to be modified. Once the set of objects that will be affected by the transformation is established, the additional data required to define the parameters of the transformation are prompted for.
The changes may relate to changing object properties. These properties can affect their geometric characteristics or the way it is displayed, affecting characteristics such as Layer, color or Linetype. The programming environment allows us to create transformation procedures that go beyond those provided in the native system commands.
Selection processes are an extremely effective resource for the development of a large number of applications not only designed to transform entities but also to check various aspects of the drawing and even to extract alphanumeric information intended for further processing by other applications. For this reason this chapter will be devoted entirely to the entity selection techniques.
As in the previous chapter the programming possibilities using the three available modes, the command/vl-cmdf interface, the ent... functions and the ActiveX extensions will be examined.

This Chapter includes the following sections:

11.1. Selecton sets..
11.2. Creating selection sets.
11.3. Preselected sets.
11.4. Modifying selection sets.
11.5. ActiveX selection sets.
11.6. Groups.
11.7. Summary.
Your questions or comments about this Chapter's contents are welcome!

Chapter 12. Modifying Entities

After selecting entities, we have a number of ways for modifying them. Generally speaking, we can classify the possible modifications in two groups: those affecting object properties and those that affect its geometry. As we did in previous chapters, we shall discuss the three options Visual LISP offers: the command/vl-cmdf interface, the classical AutoLISP functions and those that are part of the ActiveX extensions.
This chapter examins the various ways in which AutoCAD can modify drawing objects using Visual LISP programs.
As in previous cases, we will begin by examining the command/vl-cmdf interface, with a program that shows how to automate repetitive functions, including drawing new objects and trimming the original entities. Probably much of a Visual LISP programmer's job will have to do with similar issues.

After examining the possibilities of the command/vl-cmdf interface we examin the procedures available using the ent... functions which directly  access the drawing's database. We have verified the symmetry between the entmake function that creates new entities and the entmod function that modifies existing ones. It show how by simply replacing entmake with entmod we transform a Chapter 10 program that copied entities so that instead of copying, it moves them.
In this regard, we study some aspects related to the DXF system of encoding information, especially those using binary values for this purpose. This has led to the study of logic functions operating at bit level which were explained in Chapter 7 in the context of the data entry functions.
Using a different approach we have studied how to modify entities using the methods and properties exposed through Visual LISP's ActiveX extensions.
We demonstrate their use by applying them to features such as Hyperlinks, Lineweight and TrueColor.
Finally we have considered the new AutoLISP functions that enable managing properties without the use of the ActiveX interface.
In the following chapters we will develop a series of applications which will demonstrate the variety of problems that the Visual LISP programming environment allows us to address.

This Chapter includes the following sections:

12.1. Modifying properties using COMMAND/VL-CMDF.
12.2. Sample Program: Editing Geometry.
12.3. The ENTMOD function.
12.4. Differences between 2D and 3D entities.
12.5. Modifying entities through the ActiveX extensions.
12.6. Creating a Hyperlink.
12.7. Lineweight assignment.
12.8. Setting the TrueColor property.
12.9. Sample program: Color Scales.
12.10. Object Properties and Methods.
12.11. AutoLISP non-ActiveX property modification functions.
12.12. Summary.
Your questions or comments about this Chapter's contents are welcome!

Buy this book from CreateSpace eStore

No comments:

Post a Comment