Working With Blocks Part 2: Drawing Library Blocks



  
 Applies To 
  
 Product(s):gINT Logs, gINT Professional, gINT Professional Plus
 Version(s):N/A
 Environment: N/A
 Area: Report-Multiple General
 Subarea: 
 Original Author:Kathleen Holcomb, Bentley Technical Support Group
  

 

 

 

 

 

 

 

 

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.

Working With Blocks Part Two: Drawing Library Blocks

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:

  1. Go to File->Change Library.  Select training.GLB and click Open.

  2. Go to DRAWINGS->Drawing Library.

  3. Click the drop-down arrow on the object selector. Notice that five drawing library blocks are listed.

  4. Select ‘TITLE PORTRAIT’. The ‘TITLE PORTRAIT’ block is displayed.

  5. If you do not see field references such as ‘<<PROJECT.Client>>’ in the header, select Settings->Iconize Data Fields to uncheck this option.

  6. 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.

  7. 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.

  8. 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.

  9. 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.

  10. 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.

  11. 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 XY and Offset XOffset Y property pairs. X and Y specify the coordinates of the block insert on the page, and don’t affect anything else.

  12. Change the Y value to ‘9’. Click OK. Notice that the block insert moved downwards an inch, but the contents didn’t move.

  13. 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.

  14. 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.

  15. 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’.

  16. Double-click the word ‘Logo’. Its properties window opens, indicating that you can edit it. Click Cancel.

  17. In the object selector, select ‘TITLE PORTRAIT’ again.
  18. 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.

  19. Click OK to close the status window.

  20. 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.

  21. 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.

  22. 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.

See Also

Working With Blocks Part 1: Introduction https://bentleysystems.service-now.com/community?id=kb_article_view&sysparm_article=KB0056876 

Working With Blocks Part 3: Internal Blocks https://bentleysystems.service-now.com/community?id=kb_article_view&sysparm_article=KB0056892 

Working With Blocks Part 4: Private Blocks https://bentleysystems.service-now.com/community?id=kb_article_view&sysparm_article=KB0056885