April 27, 2006

Stacking Properties in a Schedule Table

There is currently no ability to "stack" properties in an ADT Schedule Table, that is, to have a row where one column has one property on top of another property. But by using a Formula property, you can easily combine the values in two separate properties into one property, to be displayed in a single column. Toss in a line feed character, and you will get one property stacked on top of the other - without a dividing line, but hey, this is not Excel.

Here is an example for a Room Finish Schedule. You can get the source file that contains the formulas that generated the image below in the Split Cells in Schedule thread in the Autdesk Archtitectural Desktop Discussion Group. The formula for the "North Matl North Fin" column looks like this:

"[NorthMaterial]" & Chr(10) & "[NorthFinish]"

"[NorthMaterial]" and "[NorthFinish]" are property references. You MUST add property references by double clicking on them in the Property Definitions box [at the bottom of the Formula Property Definition dialog in 2004/2005] or the Insert Property Definitions box [at the bottom left of the Formula Property Definition dialog in 2006/2007]. Enclosing the reference in double quotation marks tells the formula to interpret the value in the NorthMaterial property as a string.

& is the concatenation operator. It tells VBScript to combine the string value in front of it with the one behind it into one string.

Chr (10) is a use of the VBScript Chr function, which takes a decimal number as an argument and returns the associated ASCII character. "10" is the ASCII character for a line feed, so this inserts a line feed character into the string, and is what causes the balance of the string to appear on a second line in the schedule table.

No comments: