December 19, 2008

Non-Project Door Tag Using Room Number with Prefix and/or Suffix

If you are not using the Drawing Management feature (Project Browser and Project Navigator), you can still have room-number-based door numbers, and even allow for an optional prefix and/or suffix. You may have to do a little bit of setup, and create a custom Schedule Tag (or edit a copy of one of the out-of-the-box Schedule Tags), but it is really not all that hard, and the only thing that the Drawing Management feature brings (other than pre-made content) is the ability to have the room number prefixed by the Level property, which is an automatic project property. I will assume that you have dealt with that issue and have a way to assign your desired room number to each Space in a property in an object-based Property Set that is attached to each Space.

Making that room number property available to a Door is as simple as adding a Location property to an object-based Property Set that "Applies To" Doors. Location properties are best placed in object-based Property Sets. You can add one to a style-based Property Set, but unless the object already has another Location property in an object-based Property Set attached to it, the "Location grip" will not be generated and the Location property will not work. The Location grip, as seen below, is a four-pointed-star-shaped grip, that can be moved independently of the Door to which it is attached, and which will retrieve the specified property value from the first Space it finds below itself.

You can call for a Location property to return the value of any property that is in a Property Set that "Applies To" to a Space or AEC Polygon. (If you are using 2006 or earlier, Location properties also work with Area objects.) The Property Set of the referenced property must be attached to the Space or AEC Polygon in order for the Location property to return a meaningful value.

A prefix or suffix can be added by providing a manual property of the desired type. You can then display this value in a separate attribute in a Schedule Tag, as the out-of-the-box project-based Door Schedule Tag does, or by using a formula property to concatenate the prefix, room number and suffix into a single property. I have posted a sample file demonstrating how this could be done to this thread in the Autodesk Architecture Discussion Group. The DoorObjects2 Property Set in that file Applies To Door and Door/Window Assembly objects, and has the properties seen below. (Click on any image to see a larger version; use your web browser's Back button to return here.) SpaceNumber is a Location property that retrieves the SpaceObjects2:Number property that holds the room number. DoorNumberPrefix and DoorNumberSuffix are two manual properties that allow the user to add a prefix and/or a suffix to the room number value to create the final door number. The default value for each is an empty string. DoorNumber is the property that generates that final door number; it is a formula property whose formula is shown below. The formula checks the value entered into the DoorNumberPrefix property and, if it is an empty string, sets the variable doornumber1 to an empty string. If the user has entered a prefix value, doornumber1 is set to that prefix value with a period added as a delimiter, to visually separate the prefix from the room number. That part is not necessary, but some sort of delimiter may be desired if the nature of the prefixes and room numbers that you might be using could make it hard to tell if there is a prefix or not.

The formula then does a similar thing with the DoorNumberSuffix property, setting the variable doornumber2 to an empty string if a suffix was not added or to the concatenation of a period followed by the DoorNumberSuffix value, if a value was entered. Finally, the RESULT of the formula property is the concatenation of the doornumber1 value, the room number (from the SpaceNumber property) and the doornumber3 value. If no prefix or suffix is specified, then the room number is the final result, as seen at the Door in Conf 1007 in the sample plan below. The other Doors have a prefix, a suffix or both added to the room number, with the period delimeter separating any non-empty prefix or suffix from the room number.

If you want to see this in action, download and unZIP the sample file attached to my reply in the above-linked Discussion Group thread and try it out for yourself. The file was created in AutoCAD Architecture 2008, so you would need 2007 or later to be able to open the file.


Anonymous said...

I was woundering if there would be a way of using an alignment parameter to align the door tag parrallel to the door slab?

David Koch said...

What software are you using? There are no alignment parameters in AutoCAD Architecture (through and including the 2009 release).

Or are you setting the constrain to object and rotate to object properties of the tag tool used to attach the tag?

Anonymous said...

Is there a way to force the door number to automatically update when the room number changes? Or do I have to manually set the tag anchor to get it to update?


David Koch said...

If you are using a Location property on the Door to read the room number from a Space and then making that part of your door number, the door number will update when you update the room number on the Space. The change may not display immediately after making the change to the room number, but if you use the REGEN or the OBJRELUPDATE command, the door number displayed should update.

Anonymous said...

REGEN didn't change the door numbers, but OBJRELUPDATE does. Thanks for the help.