Counting Assets from AutoCAD
In Facilities Management applications it is often desirable to know how many of what assets are in a given area. In this article we will look at using Tailor Made Software’s LinkList program to figure out “How many is in a room?”.
LinkList is a command line driven program available on both Windows (32-bit and 64-bit) and Linux (64-bit). It is designed to output information about what is in an AutoCAD DWG/DXF file and can do some data mining processing on AutoCAD files.
The Count By Room function in LinkList figures out the structure based on a visual “Here’s the room, what is in it?” process. A text or block is defined as a unique ID for the room.
The Room Outline is then determined by calculating which is the smallest room outline in area (assuming there is more than one) that the ID is located in. A Room Outline (or Area Outline, it does not have to be part of a building - any defined area, even part of a mechanical part, can be used) is an area that has been defined by a closed polygon on a given layer.
The actual polygon can be either a 2D Polygon, 3D Polygon or Lightweight Polygon, the important part is that it is closed and on a defined layer.
After the Room Outline is determined, LinkList determines which other blocks are physically inside the Room Outline, and outputs the count information based on that hierarchy.
Sample Drawing:
Processing Steps:
1: Determine Room ID
2: Determine Room Outline
3: Determine Blocks in Room Outline
Example of Count By Room Processing
Count By Room Processing is done with a minimum or two and up to four parameters for the full effect. The parameters are:
1: RL or RoomLayer - defines the layer(s) that the Room Outlines are defined on. They should be the only things defined on this layer(s)
2: Count- show that Count By Room processing should be done
3: BlockName - defines which block should be used to determine the Room Id
4: BNA - defines the Block Name Attribute, the Attribute that defines the Room Id
-i="d:\drawings\anten.dwg" -json -rl=POLI-RM -count -bna=MNF_COD_M -blockname=MFM_COD_VANO
This produces a JSON file with the hierarchy and counts defined (abbreviated):
"Room_Outlines": [
{
"Outline_Handle": "17404",
"Room_Name": "ANTEN_P03_118",
"Blocks": [
{"E_P": "1"},
{"MFM_COD_VANO": "1"},
{"PAN": "1"},
{"PINT": "4"},
{"RVL": "2"}
]
},
{
"Outline_Handle": "17407",
"Room_Name": "ANTEN_P03_059",
"Blocks": [
{"E_P": "1"},
{"MFM_COD_VANO": "1"},
{"PAN": "1"},
{"PINT": "5"},
{"RVL": "2"}
]
}
]
Note: Count By Room is similar to Hierarchy Processing but here the details is how many or each block versus the detailed attribute information given by Hierarchy Processing.