Thursday, June 15, 2006

ADT 2007 (2006) - Project based wall height

Revit is, most arguably,the best BIM platform currently available for architectural professionals working in the US. I think it is intuitive, stable, and well designed software doing everything, or almost everything, that a $4K + something application is supposed to do. Yes it could be better, and as far as I know the Autodesk team is already working hard on
writing a new release packed with new and useful features which will even further establish Revit Platform as the tool of choice for more design professionals. But what if you were an old-fashioned believer in the open source or (almost open source) application that has the potential and the technology to be the BIM platform of choice for those that are not willing to go with an OOTB product, and for those that believe that the power of information lies in its ability to be interpreted and cross-referenced in a way that suits the uniqueness of your way of doing business. So for those of you that still like to use ADT 2006 or for those that feel a little bit more adventurous and are using 2007, here is a workaround that I have cooked up in order to link partition height to Project Level Height and to the Slab thickness associated to that level. I know Revit does this in quite an elegant way, but there is really no reason why ADT should not do it, and do it even better by being able to customize the relationship between AEC entities and ADT project parameters.
To accomplish this I wrote a relatively simple VBA code based on the examples that are part of the Active X help file, created a Property Definition Set in conjunction with a Display Theme that allows me to quickly identify those walls that will follow the dependency rule.
The first and the easiest part was to define a custom Project property and I have labeled it Slab Thickness with a given default value.
Start a new project (or open an existing one), and within the Project Navigator under the Project Tab proceed to Project Edit -> Edit Project Details. For project details add a new category Structural Info (fig.01), and within this category make a new entry for Slab Thickness (fig.02) and assign it a value of 12.


This step has created a new project variable that can be invoked during the wall height adjustment calculation within the Wall Object based Property Definition Set. To have this set function properly our ADT project should have levels defined in order to locate the new partition constructs.


For the sake of this exercise the set of three levels (fig.04) has been determined within the project and by doing so we are setting up conditions where Level Height information will be used to determine the height of bound or attached ADT walls.


After these project parameters are defined and their values have been assigned, the Wall Object based Property Set Definition with the following Properties needs to be created and assigned to walls whose height property will become bound to the project values. For lack of better ideas I have named this new Property Set Definition as IWall (fig.03) and made it apply just to Wall objects. It is worth mentioning that this technique could be applied to any object or style if desired to do so, with a number of project based values that that will be reused throughout a project.


The first property in this set is a Manual Property Definition named Attached (fig.05) of a Boolean type, and it will be responsible for determining which walls will be associated with the project constraints.


The second property that will play a role in determining attached walls’ height is named BoundHeight (fig.06) and its value is retrieved from Project Property Definition set as a Level Height (fig.07) property. We thereby effectively establish the relation between the wall entity and project properties.

Now in order to give some flexibility to the entire system and to show how by, adding a few other variables, this can indeed become a useful “Parametric” tool, we will add two additional properties that will govern the outcome of our Formula Based calculated Property Definition.


Slab Thickness, (fig.08) has been added as a project based property (fig.09), and I have to point out that with just a little bit more creativity and effort this property can be either allocated to individual levels or it can be retrieved from an entity within the model by writing some additional VBA



To be able to specify whether the wall is connected to the underside of the slab ToSlab (fig.10) Manual Property Definition in Boolean (True False) format, has been introduced so that user can specify which walls in the model adheres to these rules.
When all of the above properties have been assigned, the Formula Based Property CalculatedHeight (fig.11)(fig.12) will provide for the modification of AecWall BaseHeight property.

This puts us only half way through this exercise and the true engine that drives this is actually placed within these relatively simple lines of VBA code that is mostly based on the examples that came with ADT installation.
To make this work, copy the code below into a new module. From this point on when an event fires it will call this ParaWall Sub which parses the database in search of linked AecWalls and adjusts their height to the one that is associated with the current level where the construct resides. The value is pulled from the Property Set Definition, more precisely, from CalculatedHeight Property Definition and assigned to the AecWall object.

To have this working make sure that it loads with every new document so under the ADT help file look for the following topic: ”Automatically Load and Execute VBA Projects”, and make sure that your VBA project has the following code placed respectively under the “This Drawing” section and in a Module of your choice. In order to simplify the coding and use I decided to call the routine only in two instances; when loading a construct or when the REGEN command has been invoked.

Private Sub AcadDocument_Activate()
End Sub
Private Sub AcadDocument_EndCommand(ByVal CommandName As String)
If CommandName = "REGEN" Or CommandName = "REGENALL" Then
End If
End Sub

Sub ParaWall()
Dim doc As AecArchBaseDocument
Dim wallObject As AecWall
Dim Object As AcadObject

Dim SchedApp As New AecScheduleApplication
Dim cPropSets As AecSchedulePropertySets
Dim PropSet As AecSchedulePropertySet

Dim cProps As AecScheduleProperties
Dim prop As AecScheduleProperty

Dim count As Integer
Set doc = AecArchBaseApplication.ActiveDocument

For Each Object In doc.ModelSpace

If TypeOf Object Is AecWall Then
Set wallObject = Object
Set cPropSets = SchedApp.PropertySets(wallObject)

If (cPropSets.count > 0) Then
Set PropSet = cPropSets.Item("IWall")
Set cProps = PropSet.Properties
If cProps.Item("Attached").Value = True Then
Set prop = cProps.Item("CalculatedHeight")
wallObject.BaseHeight = prop.Value
End If
End If
End If

End Sub

To make all of this just a little bit more effective, I have also created an Display Theme that will allow me to quickly identify those walls in the construct that are bound either to the Level Height or to the adjusted height that takes into account the size of the structure.
This is just a very brief example of what can be accomplished in not only automating ADT, but customizing its database in order to provide for user definable parametric relationships within the project.
For those of us that think that implementing BIM methodology is not about which software tool we use but about how effectively this tool facilitates our need for extracting usable project information, much more can be accomplished if bending the rules becomes the modus operandi.

If you think that this example is of any use, feel free to download this sample file and test it on one of your projects.

Until next time….

Saturday, May 20, 2006

An interesting survey for Revit Building users

Revit Building 9 has just been released but the team is working hard again. Follow this link and help them with a survey tackling another workflow idiosyncrasy of the Revit Building BIM platform.

Wednesday, May 10, 2006

Dual Line Tag 2006 Update

As I have mentioned in my last post, this Dual Line ADT tag can be used within ADT 2006 as well. The only difference is that ByRoom or BySpace options are available as Space assigned classifications.
So for all of you that are still using ADT2006 this sample file should be helpful.

Saturday, April 08, 2006

Multi Line Schedule Tag in ADT 2007

Quite often while consulting on projects, my clients ask for the ability to enter text that appears on two lines as the part of an ADT tag, and at the same time shows as one line in their schedule tables.
My reaction for the most part was to refer them to a few posts on ADT discussion groups that give an excellent description for the approach where the user has to manually enter both lines as the part of the tag. What follows is a relatively straightforward string concatenation for the third property definition that will be referenced by the schedule table.
Needless to say, there is nothing wrong with this technique, but like any other problem, this one can be solved by an alternative approach.
Another issue that is relatively common, especially for architectural offices that are engaged in elaborate planning activities, is whether to use a manually declared room name from the RoomObjects PSD or to create a set of space styles and use the SpaceStyle name as a source for the tag value.
So, I decided to embark on creating a multipurpose Room Tag that, instead of concatenating strings, breaks them down into two rows and allows the user to decide how to split them for each instance.
Little bit of reverse engineering, a little bit of new List Definitions, (thank you o’ good people of Manchester), little bit of luck and some strong coffee and a drop of mélange and the new Tagging abomination has finally become One with the inner workings of ADT.

Here are the ingredients;
· One healthy ADT room tag project based
· Two new List Definitions (NameType and WordSplit)
· One new PSD named _ARBA_RoomObjects
· NAME_01, Formula Property Definition
· NAME_02, Formula Property Definition
· FormulaName, Formula Property Definition
· RoomName, Formula Property Definition

When thinking about the best approach to this problem, two parameters are essential for it to function properly. One that deals with the Style type and is used for storing a description for a given space, and a second one that will be in charge of determining after how many words a name string will be divided into two.
And, this brings us to the more enjoyable part connected to the ADT 2007 release.
The List Definition is the new and long awaited data container that allows one to group values into a list. That list than becomes available through the combo box on the properties palette.

For this exercise, I have created the two new lists; NameType and WordSplit. Values that pertain to NameType are ByRoom and ByStyle, and values that are predetermined for WordSplit are Integers from 1 to 9.

Here is the next step, 20 minutes to go, and in no time we will place those previously mentioned ingredients into the hot VBS wok.

From the DOCUMENT-> Scheduling -> Property Set Definitions (AecPropertySetDefine), launch the PSD dialog box and if there is an existing RoomObjects property set, highlight it and copy and paste it under a new name. In this case I have created the new property set under name _ARBA_RoomObjects, that applies to Space Objects. Feel free to name it any way you like as long as you refer to this property within the newly created AEC object tag. If you look back at the ingredients list, you will notice all of Property Definition based ones, are contained within this _ARBA_RoomObjects Definition Set.

I really had no idea or programming knowledge to know how to embed the mtext object and have it preserve its multiline quality when being converted into an attribute, so to cook this up we had to use locally grown ingredients;
The formula property definition that has been somewhat optimized to the best of my ability to parse an input string and look for spaces between words. As long as there are spaces between words and the Count variable is less than the value that is passed from WordSplit, the room name is truncated and concatenated one word at the time. Finally, RESULT determines the current value for this formula based property definition. Feel free to take this code and season it to your taste.

The RESULT generated in FormulaName property is processed by the Name_01 property that compares this RESULT to the actual Room or Space style name. Based on this comparison the first line in the room tag will be populated or left empty.

Finally to make this story short, the Name_02 property will subtract, actually replace the original content of Name_01 within the RoomName by an empty string.

Do not forget that the RoomName property definition is determined by selecting one of the two values in the NameType list, ByRoom or ByStyle .

The Case Select statement will, based the on chosen value, generate the current name for processing within FormulaName definition.
The very last piece of this recipe is creating the room tag with two line entries for the truncated room or space name. So go ahead and create a block with the following attribute content, or you can use the AEC tag wizard with two separate text lines for a new tag definition.

What I did was to modify and existing AEC OOTB Room Tag by changing the pre colon part of the attribute and matching it to the new Property Set Definition named _ARBA_RoomObjects.
After all the cooking is done, lay back, invite your family and friends, and serve this dish slightly chilled in a space or a room of your choice.
To illustrate the effectiveness of this spiced up tag, here are some examples and the sample file that is available for download from the following location.

Sample File