Autocad Lisp Insert Block From Another Drawing

Under Blocks, you can insert block at the end point or at the intersection or between selected points. Also, you can scale and change blocks in the drawing.

BLOCK COMMANDS

Sl. No.

Command

Description

1 IBEI Insert Blocks at Ends and Intersections (IBEI)
2 INB To insert blocks at the insertion point of all selected texts
3 CBL To change layers of all the blocks of one type to a specified layer
4 ISB To insert block in between two selected points in the angle of selection
5 BLR To change blocks in the drawing with new blocks using a given scale factor
6 CBB To change layer of all the blocks in the drawing to the layer of block
7 IMA To import attribute information
8 EXA To export attribute information

1. INSERT BLOCKS AT ENDS AND INTERSECTIONS (IBEI)

Menu: Insert Blocks at Ends and Intersections (IBEI)

Functionality: To insert blocks at the end points of the selected lines.

Description: In CAD, while designing underground drainages or roads for a layout, polylines or lines are used. In such projects the end points and intersection of the polylines are important, and these are referred to as nodes or junctions. These junctions will be important while generating reports related to design. Naming these nodes is a regular requirement. To mark such junctions either at end points or at intersections 'IBEI' command can be used, selectively either at end points or at intersections or both at intersection and end points block representing junctions can be inserted.

Procedure:
1. Type 'IBEI' at the command prompt.
2. Intersections / Endpoints / <Both>:  Specify one among 3 Choices.
3. SelectEntities: Select the lines for which blocks are to be inserted to the end / Intersection points.
4. Type the block name to be inserted: Type the name of the block to be inserted.

Blocks IBEI Lisp
                                               Insert Blocks at Ends and Intersections (IBEI)

2. INSERT BLOCK AT INSERTION POINT OF ALL SELECTED TEXTS (INB)

Menu: Insert Block at Insertion Point of all selected Texts (INB)

Functionality: To insert block at the insertion point of all selected texts and points.

Description: Using 'INB' command, Blocks can be inserted at the insertion point of all the selected texts.

Procedure:
1. Type 'INB' at the command prompt.
2. Specify the block name: Enter the name of the block to be inserted.
3. Select entities: Select the required texts/points.

Blocks IBEI Lisp
                                            Insert Block at Insertion Point of all selected Texts (INB)

3. CHANGE LAYER OF ALL THE BLOCKS OF ONE TYPE TO SPECIFIED LAYER (CBL)

Menu: Change the Layer of all the Blocks of one Type to specified Layer (CBL)

Functionality: To change layer of all the blocks of one type to specified layer.

Description: Layer concept in CAD is very useful and well-managed drawings will have clearly defined layers. In many drawings, all the blocks will be in a single layer, which may not be convenient to edit. To quickly move all the blocks of specified block name to another layer, 'CBL' command may be used.

Procedure:
1. Type 'CBL' at the command prompt.
2. Select the Block: Select one of a block.
3. Type the layer: Type the layer name for  which blocks to be moved.

Blocks IBEI Lisp
                                     Change Layer of all the Blocks of one Type to specified Layer (CBL)

4. INSERT BLOCK IN-BETWEEN TWO SELECTED POINTS IN THE ANGLE OF SELECTION (ISB)

Menu: Insert Block in-between two selected Points in the angle of selection (ISB)

Functionality: To insert blocks in between two selected points in the angle of selection.

Description: When creating topographic drawings, many times it requires to show the same block with different angle and scale. Rotating each block to a required angle, and scaling it as required will take a lot of drafting time. For example, when a township survey is done almost every compound will have a gate and the gates will be of different sizes. Hence the gate blocks have to be shown at each place with a different scale and rotation angle. In such cases, Using 'ISB' command, Blocks can be inserted between two Selected Points in the angle of selection.[Note: To use blocks in ISB commands, blocks have to be prepared with One Unit Height only.]

Procedure:

1. Type 'ISB' at the command prompt.
2. Enter the Block Name: Type the name of the block to be inserted.
3. Pick the first point: Select the first point.
4. Pick the second point: Select the second point.
Blocks IBEI Lisp
                             Insert Block in-between two selected Points in the angle of selection (ISB)
5. CHANGE BLOCKS IN THE DRAWING WITH NEW BLOCK AND SCALE FACTOR (BLR)

Menu: Change Blocks in the drawing with new Block and scale factor (BLR)

Functionality: To change blocks in the drawing with the new block with a given scale factor.

Description: Changing blocks in a drawing is a common requirement. For example, the tree was shown or the pole shown is expected to be changed either by the manager or by the client at the nth moment. In such cases, drawing delivery may get delayed, just because all the blocks in the drawing have to be replaced. In these cases, using the 'BLR' command, blocks can be replaced very quickly along with the scaling of these blocks.

Procedure:
1. Type 'BLR' at the command prompt.
2. Select block to replace: Select the block that has to be replaced.
3. Replace with File or Block: Type B to replace the selected block with a block or F to replace it with a file.
4. New block name: Type the name of the new block (if block was selected).
5. New block scale factor: Type the scale factor of the block to be inserted.

Blocks IBEI Lisp
                                  Change Blocks in the drawing with new Block and scale factor (BLR)

6. CHANGE LAYER OF ALL THE BLOCKS IN THE DRAWING TO THE LAYER OF BLOCK (CBB)

Menu: Change Layer of all the Blocks in the Drawing to the Layer of the Block (CBB)

Functionality: To change the layer of all the blocks in the drawing to the layer of block.

Description: As we have seen with 'CBL' command a specific type of block can be moved to specified layer. If the requirement is to move all the blocks in the drawing to layers referring the block name 'CBB' command can be used. Let us say there are 100 blocks in the drawing with 9 different names, when we give 'CBB' command, lisp will create all 9 Layers as in Block names and move all the blocks with specific block name to respective layer.

Procedure:
1. Type 'CBB' at the command prompt.

Blocks IBEI Lisp
                            Change Layer of all the Blocks in the Drawing to the Layer of Block (CBB)

7. IMPORT ATTRIBUTE INFORMATION (IMA)

Menu: Import Attribute Information (IMA)

Functionality: To Import attribute information.

Description: Using IMA Command, attribute blocks get created in CAD using the data available in AttribInfo.CSV in the temporary directory (C:\ESurvey\Temp\AttribInfo.CSV). After editing the exported data you may delete all the available attributes in CAD and import attribute blocks with updated information using IMA Command.

Procedure:
1. Type 'IMA' at the command prompt.
2. Specify the Attribute Block Name: Mention the attribute block name.
[Note: You need to have 'AttribInfo.CSV' file in temporary directory to create attributes with X, Y, Z information in first 3 columns followed by attribute information]

Blocks IBEI Lisp

                                             Import Attribute Information (IMA)

8. EXPORT ATTRIBUTE INFORMATION (EXA)

Menu: Export Attribute Information (EXA)

Functionality: To export attribute information.

Description: Attribute blocks in CAD are a very useful tools to store data with drawing objects. But editing attribute block is cumbersome when there are many blocks. Also if the attribute information is available in tabular format, it will be handy for information exchange. Using the 'EXA' command you can export the attribute information. When you specify the attribute block name, attribute information will be exported to a file 'AttribInfo.CSV' in Temporary directory (C:\ESurvey\Temp\AttribInfo.CSV).  This file can be further used for editing or data exchange. Note that EXA command exports insertion point of the attribute block that is (X, Y, and Z) along with the attribute information.

Procedure:
1. Type 'EXA' at the command prompt.
2. Specify the Attribute Block Name: Mention the attribute block name.
3. Select entities: Select attribute blocks from which attribute information to be exported.

Blocks IBEI Lisp
                                                   Export Attribute Information (EXA)

jonesthenter.blogspot.com

Source: https://esurveying.net/autocad-autolisp-collection/block-entities

0 Response to "Autocad Lisp Insert Block From Another Drawing"

إرسال تعليق

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel