This post will detail how to add Acres or a combination of Square Feet and Acres to the inverse report by adding a few lines of code.
The source files for all of the XSL reports can be found here: C:\ProgramData\Autodesk\C3D 20xx\yourlanguage\Data\Reports\xsl The filenames themselves are easy enough to decipher. Before editing our file, Parcel_Inverse.xsl, I strongly suggest that you make a backup copy of the original Autodesk supplied file. In practice, I would make a backup and name it Parcel_Inverse.xsl.ootb (ootb is an extension that I use to communicate to myself that this is an unaltered "out of the box" file).
[In a future post, I'll discuss a method for organizing custom reports without having to continually modify files on one or more C drives. By using a little organization, we can make customization much more workgroup friendly and upgrade friendly.]
Once you've made a backup copy, let's open Parcel_Inverse.xsl. This is a simple text file which can be edited with any text editor. I prefer to use Notepad++ because it highlights code in virtually every language that I use. If you don't want to install another text editor, Notepad will do just fine, albeit in all-black text.
Locate this line in two places:
<td><xsl:value-of select="landUtils:FormatNumber(string($ParcelArea), string($SourceAreaUnit), 'squareFoot', string($Parcel.2D_Area.precision), string($Parcel.2D_Area.rounding))"/></td>
Immediately after each instance of the line above, paste the following:
<!--Custom Code 2013-07-18 (rs) START --> <tr> <td width="33%"> </td> <td>Acres</td> <td> <xsl:value-of select="landUtils:FormatNumber(string($ParcelArea), string($SourceAreaUnit), 'acre', string($Parcel.2D_Area.precision), string($Parcel.2D_Area.rounding))"/></td> </tr> <!--Custom Code 2013-07-18 (rs) END -->
As I mentioned, you'll have to do this in two places. Once to accommodate when your report settings are set to "Default," which inherits the DWG file's area unit , and then again to accommodate when your report settings are set explicitly to "Square Feet."
As of this post, using the Autodesk-supplied file that came with Civil 3D 2014, the custom code above should be pasted immediately after line 68 and then again after line 78.
Once this is complete, save the file and reexecute the report from the toolbox. Hopefully, you'll see Acres listed immediately below Square Feet.
No comments:
Post a Comment