Drawing library blocks can be used in for any type of report or drawing application. When you change a drawing library block, all the drawings in the library that refer to the block are automatically updated. They make creating reports easier, give them consistency, and make them easier to maintain.
Note: This exercise requires the use of the training.GLB library available from: download.aspx. Instructions for unzipping and setting up the library is on: using gint downloaded examples.aspx.
Drawing library blocks for the current library are maintained in the DRAWINGS->Drawing Library tab. We will investigate some of the standard drawing library blocks that are found in several gINT libraries, and demonstrate the nesting of blocks.
Do the following:
Go to File->Change Library. Select training.GLB and click Open.
Go to DRAWINGS->Drawing Library.
Click the drop-down arrow on the object selector. Notice that five drawing library blocks are listed.
Select ‘TITLE PORTRAIT’. The ‘TITLE PORTRAIT’ block is displayed.
If you do not see field references such as ‘<<PROJECT.Client>>’ in the header, select Settings->Iconize Data Fields to uncheck this option.
Using the Quick Zoom tool, zoom in on the lower left corner. Notice the blue block insert ‘DWGLIB TRACK_CODES All’ at left, and the tracking code along the edge of the border rectangle.
TRACK_CODES is a drawing library block that has been inserted into the present block (TITLE PORTRAIT). The contents of the TRACK_CODES block are indicated in a color (blue) that matches the color of the insert.
Zoom out using the Zoom Extent button, then zoom in on the heading and the red block insert to its left.
Notice that the red block insert corresponds to contents, indicated in red, inside the header area.
Double-click on the ‘CLIENT’ text entity. Notice that the TEXT PROPERTIES window opens for it, indicating that you can edit the entity. Click Cancel.
Double-click on the black frame around the heading. Notice that the POLYLINE PROPERTIES window opens for the frame rectangle, indicating that this also can be edited. Click Cancel.
Double-click on the red word ‘Logo’. Notice that nothing happens, except that the program prompts you to select an entity. Press Esc to clear this prompt.
You cannot directly open this text because it is included by reference in TITLE PROJECT, as a part of the COMPANY INFORMATION block.
Double-click on the red COMPANY INFORMATION block insert. The BLOCK PROPERTIES dialog box opens.
This properties window defines how the COMPANY INFORMATION block is used in the current block. Notice that the Block Source property indicates that the source is a block called ‘company information’ in the drawing library, and the color the COMPANY INFORMATION insert and contents are displayed in is ‘Very Light Red’.
Notice also the X, Y and Offset X, Offset Y property pairs. X and Y specify the coordinates of the block insert on the page, and don’t affect anything else.
Change the Y value to ‘9’. Click OK. Notice that the block insert moved downwards an inch, but the contents didn’t move.
Offset X and Offset Y specify where on the current page the inserted block’s contents appear. Double-click the COMPANY INFORMATION block insert again, and change Offset X to ‘1.05’. Click OK. Notice that the inserted block moved an inch to the right.
Press Ctrl-Z (Undo) to restore the inserted block’s contents to the correct location.
You can use other properties in a block insert’s BLOCK PROPERTIES window to rotate or scale the inserted block’s contents, assign it to a drawing layer, or make it output conditionally.
To edit the source block (COMPANY INFORMATION), you can select it in the object selector, or you can Alt-click on the block insert. We’ll use the latter option: hold down the Alt key and click on the block insert for COMPANY INFORMATION. The COMPANY INFORMATION block opens in the Drawing Library tab.
Notice that ‘COMPANY INFORMATION’ is selected in the object selector, not ‘TITLE PORTRAIT’.
Double-click the word ‘Logo’. Its properties window opens, indicating that you can edit it. Click Cancel.
We’d like to know where the TITLE PORTRAIT block is used. Select Blocks->References to This Block. A log window appears listing this.
Notice that the block is used in a wide range of reports, and also in one internal block (LogBlk!LOGO AND TITLE). Let’s see how TITLE PORTRAIT is used in some of these.
Click OK to close the status window.
Go to REPORT DESIGN->Graphs. Select ‘INDEX PROPS’ in the object selector, if not already selected. Notice the black elements, which are entities in the graph report, and the red elements, which are from inserting the TITLE PORTRAIT block.
Click on the Histograms, Graphic Tables, and Graphic Text Docs tabs in turn. Notice how different reports use the TITLE PORTRAIT block to create a consistent frame and header. If you make a change to the TITLE PORTRAIT block, it will be reflected in all of these reports.
Go to REPORT DESIGN->Logs, and select ‘ENVIRONMENTAL BH’ in the object selector. Notice that the same basic frame and heading we saw in TITLE PORTRAIT is present, but the block has a different name (LOGO AND TITLE) and an additional pair of text entities at upper right. Also, it is an internal (log) block rather than a drawing library block, as indicated by the word ‘INT’ (rather than ‘DWGLIB’) at the start of the block insert. Press Alt and click on the LOGO AND TITLE block insert to open it.
Notice that the TITLE PORTRAIT drawing library block is inserted in the LOGO AND TITLE block, and provides most of its lines and text.
This demonstrates that you can insert a drawing library block in an internal (application-specific) block. However, the reverse is not true: you cannot insert an internal block in a drawing library block. The reason for this is that internal blocks can contain entities that are specific to the application type, such as text-vs-depth columns in a log block, and these are not valid in other applications. So if nesting of internal blocks inside drawing library blocks was allowed, you might have log entities being inserted into a graph, for example, which wouldn't work.
Working With Blocks Part 1: Introduction https://communities.bentley.com/products/geotechnical1/w/wiki/12371.working-with-blocks-part-1-introduction.aspx
Working With Blocks Part 3: Internal Blocks https://communities.bentley.com/products/geotechnical1/w/wiki/12374.working-with-blocks-part-3-internal-blocks.aspx
Working With Blocks Part 4: Private Blocks https://communities.bentley.com/products/geotechnical1/w/wiki/12378.working-with-blocks-part-4-private-blocks.aspx