Add / Update Links

Click buttons on image below to explore...

Block Library Add / Update Links Colour by Spec Status Colour by Block Version Reset Colour Drawing Check Redefine Superseded Blocks from the Specs & Standards Website Redefine Selected Blocks from the Specs & Standards Website Redefine Blocks with Drawings in a Local Folder Configure Export Settings Assign Departments to Polyline(s) Export Quantities to a selected Project Remove Existing Departments From Polyline(s) Apply a Set of Standard Parameters to Blocks Create a JPEG Thumbnail Image Help Display the IconCAD Version Number IconCAD Add-In for AutoCADĀ®

This routine checks all Blocks that are in the current drawing to see if they exist on the Specs & Standards website that the IconCAD Add-In is currently configured to work with. For Blocks that are on the website, a *required* (meaning that there is a whole lot that is NOT imported...) set of specification information is pulled from the site and attached to the Block.

As part of this process, hyperlinks that link back to the corresponding specification are added to the Blocks. Block attributes are created / updated on the 'on-the-fly', and populated with a set of information that is used by the other IconCAD routines.

Please Note: If the specification and / or Blocks on the Specs & Standards website are being changed regularly, you will need to re-run this routine regularly as well. This is important as the Colour by Spec Status, Colour by Block Version and Redefine Blocks routines all work with the information this routine imports. It is therefore best to re-run Add / Update Links before running the other routines. This will ensure that the imported information is up to date and the routines are able to deliver the correct results.

Detailed Functionality

The routine goes through the following processes:

  • Checks to see if the IconCAD Add-In is running and if not, notifies the user accordingly
  • Checks to see which IconSystem website the Add-In is currently configured to use and then displays it to the user (e.g. https://demo.iconsystem.co.uk)
  • Gets a list of all Blocks in the drawing's Block listing, ignoring hatch, xrefs, Block created from bound xrefs, cut and pasted Blocks (i.e. where the name begins with A$), any Block name beginning with an underscore, any Block name beginning with TerminatorO and / or DimBlks
  • This list is then sent to the Specs & Standards website where each Block name is checked to see if it exists in the CAD Library
  • Where there are matches, the website checks which item each Block relates to and returns the IconSystem Classification (e.g. 'M10-0001'), the Item Description (e.g. 'Cavity Wall, 315mm'), Item Status (either Innovation, Current, under Review or Obsolete), and CAD File Version (e.g. '3')
  • Back in AutoCAD the routine then process each Block in turn. The first change that's made to the Block being processed is that a hyperlink, linking back to the corresponding item on the Specs & Standards website (e.g. https://demo.iconsystem.co.uk/?fp=standards/item.asp?Ref=M10-0001), is added to each component of the Block definition (note that this process overwrites any existing hyperlinks in the Block)
  • The routine then loops through the process below, checking if the following attribute definitions exist in the Block: ICONSYSTEMCLASSIFICATION, ICONSYSTEMBLOCKCOLOUR, ICONSYSTEMSPECSTATUS, ICONSYSTEMBLOCKVERSION and  ICONSYSTEMBLOCKSTATUS
  • If the attribute definitions don't exist, they are added to the Block definition (note that they are created as 'Constant' attributes, so will not be visible with the AutoCAD ATTEDIT command, this is apart from the ICONSYSTEMCLASSIFICATION and  ICONSYSTEMBLOCKCOLOUR attributes which are created as 'Invisible' attributes so that they can be set individually in Blocks placed in the drawing. This is needed so that the Colour by Spec Status and Colour by Block Version routines have somewhere to store specific Block colours and also to allow the IconSystem Orbit online viewer to work.
  • The ICONSYSTEMCLASSIFICATION attribute is then populated with the IconSystem Classification (e.g. 'M10-0001')
  • If the ICONSYSTEMBLOCKCOLOUR attribute is added, it is set to 'No Specific Colour Set'. If it already existed, it is not adjusted.
  • The ICONSYSTEMSPECSTATUS is updated with the value as returned by the Specs & Standards website
  • If the ICONSYSTEMBLOCKVERSION does not exist, the routine goes through the same process as above and then sets the ICONSYSTEMBLOCKSTATUS attribute to Current
  • If the ICONSYSTEMBLOCKVERSION does exist, the routine DOES NOT change it, but instead compares the current value of the attribute with the value as just returned by the Specs & Standards website. If the values are different (i.e. there is a later Block version available on the Specs & Standards website), the routine sets the ICONSYSTEMBLOCKSTATUS attribute to Superseded. It is this superseded status that is used by the Colour by Block Version routine to identify out-of-date Blocks and also by the Redefine Blocks routines
  • When the first Block has been processed, the routine repeats the above process with all the other Blocks.

Speed Note: In tests, using an AutoCAD drawing that has 2,000 unique Blocks in it, the routine processes around ten Block references a second.

Version History

1.24 - 26/08/17: ICONSYSTEMBLOCKLOCATON Attribute Added
1.23 - 17/08/17: Added IconSystem to list of blocks to be ignored
1.22 - 03/07/17: Forced update of ICONSYSTEMCLASSIFICATION attribute.
1.21 - 30/03/17: Block download authentication added; minor fix to reporting
1.20 - 04/10/16
: Minor tweak
1.19 - 14/07/17
: Added identification of Deleted blocks
1.18 - 21/06/16
: Revised to separate specification versions from Block versions. Layer states are now saved when the routine starts, then restored when it completes.
1.17 - 17/06/16
: Updated storing and restoring of AutoCAD variables
1.16 - 10/06/16
: Now adding the ICONSYSTEMBLOCKCOLOUR attributes to Blocks
1.15 - 06/06/16
: Reworked process for ignoring Blocks. The routine now ignores hatch, xrefs, Block created from bound xrefs, cut and pasted Blocks (i.e. where the name begins with A$), any Block name beginning with an underscore, any Block name beginning with TerminatorO and / or DimBlks
1.14 - 25/05/16
: Reworked process for identifying superseded Blocks
1.13 - 19/05/16
: Set to ignore Blocks named: _ARCHTICK, _CLOSED, _CLOSEDBLANK, _NONE, _OBLIQUE, _OPEN, _OPEN90, _ORIGIN, DIMBLK, TERMINATOROPEN or TERMINATOROPEN_0.5
1.12 - 14/05/16
: Revised so that information relating to all Blocks is requested and returned from the Specs & Standards website in one process, the results of which are then used to determine which Block(s) to update
1.11 - 03/05/16
: Timer and additional reporting added
1.10 - 20/04/16
: Added prompt to check the Internet connection in situations where responses from the Specs & Standards website are taking a long time
1.09 - 13/04/16
: Updated the check to see that the Add-In is logged in to a Specs & Standards site before proceeding
1.08 - 11/04/16
: Temporarily, until Autodesk updates its .dwg translator engine, changed the Domain Name Attributes from Constant to Invisible so that the IconOrbit online viewer will work
1.07 - 06/04/16:
Replaced the delay introduced in v1.04 with a loop which waits until the data to be returned from webserver before proceeding
1.06 - 14/03/16
: Revised to add an ICONSYSTEM attribute to Blocks so that the Drawing Check routine can use it
1.05 - 03/03/16:
Minor speed improvement made by revising the routine so it skips the checking process with pasted Blocks, i.e. those whose names begin with A$. Note that hatch Blocks, those beginning with an asterisk, were already being ignored
1.04 - 29/02/16: Added a 1,000 millisecond delay after the request has been sent to the IconSystem website to allow results to be returned before the routine proceeds
1.03 - 25/02/16: Changed the hyperlink descriptions to match the name of the item in Specs & Standards
1.02 - 10/02/16: Completed the adding and populating of attributes
1.01 - 09/02/16: Hyperlink to item datasheet added
1.00 - 09/12/15: Initial version.