Bob Stirling from Whitehorse in Canada's Yukon Territory works with geographical information systems (GIS) for rock and soil geochemistry. He uses assay information in the form of spreadsheets that contain sample data with blocks representing a variety of rock, soil or silt (or other conditions) and attributes that describe the assay location, identifier and any number of other attributes, depending on the block symbol. Bob requested a routine that would plot the assay data by inserting the blocks and displaying the attribute values from the spreadsheet.
This AutoLISP Solution is a return to a program that first appeared in Cadalyst some time ago, and has been modified considerably to become INS-BLK2.LSP. The new routine not only inserts blocks at designated locations, but also adds any number of attributes contained in each of the block definitions. Attribute values are defined in the spreadsheet data. The number of attributes for each block is defined by the block itself, and the order of the attributes is predefined when the attribute definitions were selected to form the block. The spreadsheet data does not specifically name any attribute tags, but only contains the attribute values, together with the block names and their intended x (east), y (north), and z (elevation) insertion points.
Get the Code
Download the INS-BLK2.LSP and INS-BLK2.DCL files from the Get the Code area at Cadalyst.com and save them in AutoCAD's Support directory. Use the Appload facility by selecting Tools / Load Application. Then select the INS-BLK2.LSP program from where you stored the downloaded files.