The attached AutoLISP file should do what you want (with some tweaking, perhaps). It defines a command called AP2TAG, which prompts the user to select a Polyline, and then a Room Tag Block. If the user fails to select the desired object, a second chance is offered (or the user can quit).
The user is notified if the block reference selected has no Attributes. If it has Attributes, they are examined one by one, and if the Attribute Tag is "AREA", then the Area value from the Polyline is pushed to that Attribute as its new value; if the Attribute Tag is "PER", then the Perimeter (Length) value is pushed to that Attribute as its new value. There are command line prompts noting that the Area or Perimeter have been updated. If Attributes with those Tags are not found, the program ends without any notice to the user.
Your drawing length units are millimeters with two-decimal-place precision, and your Area unit is set to square meters with two-decimal-place precision. The value entered into the tags for "H" (which I assume is height) appear to be in meters. I assumed that you would want the values in square meters (Area) or meters (Perimeter), so I divided the Area by 1000000 mm2/m2 and the Perimeter by 1000 mm/m, and then formatted the strings to be pushed to the attributes to have two-decimal places. All of that can be adjusted, if you prefer.
David Koch
AutoCAD Architecture and Revit User
Blog | LinkedIn
