Ferrule Clash Checks in Precast Panels – Check the Elevation From the Marking Plan (AutoCAD .net API)

_config.yml

I’ve smashed out some code which checks for collisions between ferrules for panels located in a completely different drawing – the elevation – given that we are working on the marking plan. For a complete description of what this is about you can read about it here. The following article will elaborate on the AutoCAD .net code that was required in order to make that possible.

What are the requirements?

  • From the marking plan, we want to check the height of the ferrules in a panel contained in an elevation drawing.
  • Accordingly we need to obtain the values of the panels we are searching for. These values are contained in the attribute values of a particular block reference and is easy to extract.
  • Using these attribute values (which are panel numbers) we then open up a new drawing – the elevation drawing.

Here is the code:

As you can see I’m reading all the contents of a drawing into a new database. And I simply query that database to get the information that I want – whether the ferrules are of a similar height or not. This logic is encapsulated in the cheker variable, which is an interface of type IChecker. This allows me to inject different types of checks as the need arises – because I can definitely see that in the foreseeable future, people will want different types of checks to be made.

Here is a video demonstration:

Checking for Clashes in Starter Bars between different panels from Tek1 on Vimeo.

We’re always pushing for better, faster and more efficient.

Written on October 14, 2017