Home - - Add Objects to Block for AutoCAD 1.2

Add Objects to Block for AutoCAD 1.2

Publisher:
File size:
12 KB
Date added:
Mar 17, 2022 | Last update check: 1 minute ago
Licence:
Free
Runs on:
AutoCAD
Download Latest Version
(12 KB)

Add Objects to Block for AutoCAD is a LISP program that enables you to incorporate a selection of objects into the block definition of the specified block. It allows you to add objects from your drawing into block without modifying it in Block Editor. The function syntax is ADD2BLOCK. This program is similar to “Add” function in “Edit Group” mode in Revit. It works in all UCS and Views. Also it includes the REMOVE function to allow you to remove objects from block definitions.

Typical workflow:

  1. Start the program. Load the program (see “How to load an AutoLISP program“). Write ADD2BLOCK in command-line and press Enter.
  2. Select objects to add to a block. Select objects residing on unlocked layers to be added to a chosen block definition.
  3. Select block to add objects to. Select a reference of a block whose definition is to be modified to incorporate all objects in the selection. The program permits selection of any standard (non-dynamic) uniformly scaled block reference which is not referenced within the selection (as a block reference cannot be added to its own definition).
  4. Selected objects are added to the specified block. Every object in the selection is transformed relative to the position, scale, rotation, and orientation of the selected block reference, before being copied to the definition of the block and removed from the drawing. Following modification of the block definition, the active viewport will be regenerated to display changes throughout all inserts.

About AutoLISP

AutoLISP is a simple programming language that has been specifically written for designers and architects. AutoLISP originated from LISP language that was created before AutoCAD and was not specifically written for designers. AutoLISP is an AutoCAD’s own version of LISP. LISP is an acronym for List Processing. The format of the LISP language revolves around the proper structure of the lists. A list is defined with parentheses, with the function specified first. It is integrated with the AutoCAD environment, and it contains built-in functions that create and edit geometric entities. Since AutoCAD 2000, the original AutoLISP engine was replaced with the Visual LISP engine. Most people use the phrase LISP instead of AutoLISP and Visual LISP. LISP file extension is .LSP.

How to load an AutoLISP program

  1. Download the AutoLISP file.
  2. Decide between two options:
    • Load the program file into the current drawing session. In AutoCAD, go to Manage – Load Application, or enter APPLOAD in the command-line. Select the program file and click “Load”. Now all the functions within that file are available to you.
    • Load the program file(s) when you open a drawing. AutoCAD automatically loads two LSP files if they’re found in the support directory locations. The files are called Acad.lsp (loads when you start AutoCAD) and AcadDoc.lsp (loads when you create or open a new drawing). If the files don’t exist you need to create them (using Visual LISP Editor or Notepad) and save it in AutoCAD support path. To add a new support file search path in AutoCAD, go to Options – Files – select Support File Search Path – Add – browse for the location of the LSP files – Ok. Using the load function within the AcadDoc you can automatically load other LSP routines. When you create or open a new drawing, it loads the LISP file and all the functions that are found within it. If loading many LISP files on startup cause drawings to open slower, you can use AutoLoad function to load LISP files when you enter a specific command at the command-line.

What’s new in version 1.2:

  • Program completely rewritten to incorporate a check for references of the target block within the selected objects.

About Lee Mac Programming

Lee Mac Programming is founded by Lee Mac, a developer from England dealing with AutoCAD customisation. He started programming AutoCAD in 2009. In AutoLISP he sees the potential for productivity in customisation and automation. With the support of the CADTutor and TheSwamp communities he developed collection of AutoLISP functions.

Gallery

Add Objects to Block for AutoCAD Screenshot 1
Load AddObjectsToBlock LISP program in AutoCAD. ©Akar Technical

Add Objects to Block for AutoCAD Screenshot 2
Use ADD2BLOCK command to start the program. ©Akar Technical

Add Objects to Block for AutoCAD Screenshot 3
Select objects and a block to add objects to. ©Akar Technical


Latest Version

Add Objects to Block for AutoCAD 1.2

Old Versions