March 20, 2007

Another Formula Property Override Example


A sample file showing how a style-based manual property holding room finish information and attached to a Space style can be overridden using an object-based Property Set Definition [PSD] with a manual override property and a formula property can be found in a reply I made to the ADT2006 Preset style based room finish PSD's thread in the Autodesk Architectural Desktop 2007 & Prior Discussion Group. Look for the FloorFinishOverrideTest.zip attachment.

The four Spaces in the file all use the Office Space Style, which has a PSD called SpaceStyles-FloorFinish attached. The sole property in that PSD, FloorFinish, is set to "CARPET" for that style. Each Space has the object-based SpaceObjects-FloorFinish PSD attached. In addition to containing Name and Number manual properties, that PSD also contains a manual property called FloorFinishOverride, which, surprisingly enough, serves as the manual override property. The default value of FloorFinishOverride is an empty string [""]. A formula property, called FloorFinishSchedule, is the property that appears in the right column of the Schedule Table in the file. The formula tests the value of FloorFinishOverride; if it is an empty string, the formula passes through the value of the style-based FloorFinish property. Otherwise, it passes through the override value entered in the FloorFinishOverride property. The formula looks like this:
If "[FloorFinishOverride]" = "" Then
RESULT = "[SpaceStyles-FloorFinish:FloorFinish]"
Else
RESULT = "[FloorFinishOverride]"
End If


In the sample file, rooms 102 and 103 do not have an override value set, and so the "CARPET" value is passed through the formula property, while rooms 101 and 104 have overrides set, and those values are passed through the formula property. This technique is fairly easy to set up initially, and can allow you to take advantage of having style-based manual properties, avoiding the need to enter often-repeated data for each instance, while still having the flexibility to have selected instances vary, without having to create a new style for each unique case. For room finishes, this becomes even more critical when you add in wall base, wall and ceiling finishes - you would either have a large number of Space Styles or you would end up making the properties object-based and have to enter and maintain the data for each instance.

You can find more information on If Then Else Statements in formula properties and their use in overriding another property here and here.

1 comment:

Anonymous said...

It was great to see your blog listed for the keyword 'architecture ' at blogsearch.sg ... I found your article about architecture quite interesting among the many more posts that are listed at blogsearch.sg