CADViewer Technical Documentation, Installation Guide and Reference Samples Library

Working with Blocks

When working with blocks, we have compiled a set of Guides that can help you optimize the block content you would like to work with in your drawing:

Declutter blocks


Extract attributes as JSON

Illustrates how to use LinkList 2023 to extract block and block attribute content out of a drawing, which can then be used to manipulate the blocks in the CADViewer front-end.

Sample extracted JSON block with attributes (abbrieviated):

{
    "Outline_Handle": "17404",
    "Room_Name": "ANTEN_P03_118",
    "Blocks": [
      {
        "Name": "AN_ARC_E_P03_ID$0$COD_LOC_cmb",
        "Layer": "A_COD_locali",
        "Handle": "9453",
        "Attributes": [
          {"XX": "AN"},
          {"X": "03"},
          {"X": "ATTESA"}
        ]
      },
      {
        "Name": "MFM_COD_VANO",
        "Layer": "A-LOCALI",
        "Handle": "102691",
        "Attributes": [
          {"MFM_BLOCKCODE": "RM"},
          {"MFM_DESCRIPTION": "VANO"},
          {"MFM_AZIENDA": "MFM"},
          {"MFM_COD_COMPLESSO": "MNZ0101"},
          {"MFM_COD_EDIFICIO": "MNZ0101_ANTEN"},
          {"MFM_COD_PIANO": "MNZ0101_ANTEN_P03"},
          {"MFM_COD_LOCALE": "MNZ0101_ANTEN_P03_118"},
          {"MFM_COD_MACROAREA": "03) BASSO RISCHIO"},
          {"MFM_COD_N": "ANTEN_P03_118"}
        ]
      },
      {
        "Name": "LSM",
        "Layer": "I-EMERGENZA",
        "Handle": "10E802",
        "Attributes": [
          {"MFM_BLOCK": "1"},
          {"MFM_BLOCKID": "104"},
          {"MFM_BLOCKCODE": "LSM"},
          {"MFM_NAME": "MFM_BLOCK_104_000001"},
          {"MFM_NAMEB": "LSM_000001"},
          {"MFM_DESCRIPTION": "PLAFONIERA CON MODULO EMERGENZA"}
        ]
      },
      {
        "Name": "PINT",
        "Layer": "I-ELETTRICO",
        "Handle": "112F14",
        "Attributes": [
          {"MFM_BLOCK": "1"},
          {"MFM_BLOCKID": "104"},
          {"MFM_BLOCKCODE": "LSM"},
          {"MFM_NAME": "MFM_BLOCK_104_000001"},
          {"MFM_NAMEB": "LSM_000001"},
          {"MFM_DESCRIPTION": "PLAFONIERA CON MODULO EMERGENZA"},
          {"MFM_AZIENDA": "MFM"},
          {"MFM_DESCRIZIONEAZIENDA": "MFM"},
          {"MFM_NAMEU": "marco"}
        ]
      }
   ]
}
Last updated on 20 Aug 2022
Published on 8 Aug 2022