Autocad Lisp Count Objects In Autocad

  вторник 10 марта
      31

Tipster Andria Lynch sends us a tip that allows users to quickly determine the number of blocks in a file.
'To do a quick and simple block count in AutoCAD Architecture, simply highlight the block you wish to count, right-click, and choose Select Similar. This shortcut will select all instances of that block — keep in mind that they must be on the same layer. If you glance at your Properties menu while all instances are selected, the pull-down menu at the top of the Properties palette will display in parentheses the number of objects selected. The Quick Properties box will also display this information with block references.'
Notes from Cadalyst Tip Patrol: The Select Similar tool is new to AutoCAD 2011 and is available to all AutoCAD verticals, such as AutoCAD Architecture and Civil 3D. This tool will select all of the items that are similar to the one you picked, according to certain filters. Type SelectSimilar on the Command line, followed by Settings to get to the filter settings. Pick the criteria that you want AutoCAD to follow. The selected properties must be the same in order for AutoCAD to select similar objects.

(2002–06). (2002–07). Torrent (2002–05).

Using AutoLISP to Manipulate AutoCAD Objects
AutoLISP Developer's Guide > Using the AutoLISP Language > Using AutoLISP to Manipulate AutoCAD Objects >

Xrecord objects are used tostore and manage arbitrary data. They are composed of DXF groupcodes with normal object groups (that is, non-xdata group codes),ranging from 1 through 369 for supported ranges. These objects aresimilar in concept to xdata but is not limited by size or order.

Saved from: keep objects centered at approximately the same position in the drawing. Should work on AutoCAD 2000 and newer.

The following examples provide methods for creatingand listing xrecord data.