Ad

Monday, February 07, 2011

XML Reporting

Civil 3D provides reporting methods using both XML Reporting and .NET reports. This post is imagegoing to focus on the XML Reporting. XML Reporting lets you export information from a drawing into an XML file which is  then transformed using an XSL file. The first thing you should know about XSL, is that Autodesk views them as example reports as indicated in the warnings contained within the XSL sheets.

“This is a sample report form for generating metes and bounds legal descriptions for parcels.  This report form (stylesheet) is not intended to be a replacement for a trained, experienced professional.  It is intended as a example to make the professional more productive.”

While we can wish Autodesk would put in a report exactly the way we want, it would appear Autodesk’s position is that you the professional should take the example and produce your own report that meets your requirements. So now that we know we need to modify the reports to meet our requirements, how do we do this?

First we need to know where the report files are stored. They are located here: C:\ProgramData\Autodesk\C3D 2011\enu\Data\Reports\xsl (at least in Windows 7/Vista). Each report has it’s own XSL file. The XSLstands for EXtensible Stylesheet Language and provides the instructions on how the XML file should be transformed into a report. There are XSL editors available, but I haven’t had much luck in using them. Instead I’ve been using Notepad to modify the reports.

The XSL then uses other files contained in the source folder. Each of them does different things. For instance the Conversion_JScript.xsl converts the units from Metric to English or the other way around or changing the unit types (such as feet to miles). Modifying them is as straight forward as modify the text. As the file name indicates the conversion file uses JavaScript to run the report.

The GeneralLegalPhrasings.xml file has the wording used for the legal descriptions. So if you wanted to change the wording in the Parcel reports, you’d modify the wording in this file.

This is just a brief explanation on how to modify the files, I may post more another day.

If you don’t want to modify the reports yourself, I’m available and willing to provide quotes to modify the XML reports to meet your requirements. Just Email me for more information.

18 comments:

TOPOGRAFIA - ALFATOP - TATUÍ-SP said...

Friend, I'm a fan of your blog, love all your posts.

I have a doubt in the parcels.

My reports are coming out like this:

Point of Beginning: North: East 7443062.5275m: 225425.2309m

Segment # 1: Line

Course: 068 ° 05 '15:52 "Length: 91.993m
North: East 7443096.8581m: 225510.5779m



it is possible to leave as well? in parentheses

Point of Beginning: North: East 7443062.5275m: 225425.2309m

Segment # 1: Line

(Course: 068 ° 05'15 "Length: 91.99 m)

North: East 7443096.8581m: 225510.5779m

Christopher Fugitt said...

Yes it is possible.

You can change the wordings in this file: C:\ProgramData\Autodesk\C3D 2013\enu\Data\Reports\xsl\GeneralLegalPhrasings.xml It looks for the words in {} and replaces them. So replace your information with the words that represent the number and then copy the information into the XML file.

For instance "Course: 068 ° 05'15 "" would become "Course: {linedirection}"

Anonymous said...

Do you have a way to get the Station and Curve report from Alignments to print the PI station?

Christopher Fugitt said...

Yes, it is possible to get report that information. I don't have any examples handy. You can look at the Alignment PI report to see how it is done in that report.

I do provide report customization services if you require additional help.

Unknown said...

So I am trying to edit the generallegalphrasings.xml, we want the bearing of a line to be spelt out, North instead of N and so on. we also wanted to change the curve description to tell us the length of the curve, the curve rotation, the radius, then the chord bearing and distance. looking at the xml file I don't see how the descriptions I am getting are possible, they give us the delta of the angle but does not have that command in the xml.

Christopher Fugitt said...

I'm a bit busy currently helping paying customers and won't have time to address your questions for another two or three weeks.

Anonymous said...

I would like to know if a way has been found to add the length of the curve to the legal phrasing file in xml. Scott had asked about this a while back - is there a solution?

Christopher Fugitt said...

Here is how to add the curve length. http://blog.civil3dreminders.com/2014/01/xml-reportingcurve-lengths.html

Unknown said...

I have located the "general legal phrasings.xml" and edited the wording to fit my preferred description style, but I cannot save the file...I get a note saying "access denied". Do you have any idea why this would happen? Thanks.

Christopher Fugitt said...

Yes, it's because it's in a protected windows file location. Move it to another folder, make the change and then move it back.

Unknown said...

i need help with the report part, when i do the general legal description and pick my file, it shows an error on the export of the landxml file, any idea what im doing wrong or how i can fix thix

Christopher Fugitt said...

What did the error say?

Unknown said...

Error displaying report in registered browser. The specified file was not found...

I'm a old school land desktop and Carlson user, so civil 3D from 09 on is tough for me

Christopher Fugitt said...

Is your default browser Internet Explorer? If not make it so and see if that fixes it.

Unknown said...

I want to remove the spaces between the letters and symbols in the bearing call as follows: S 28° 56' 31" E to S28°56'31"E. How do I edit the (lineDirection) file that it is pulling this info from?

Christopher Fugitt said...

Open the xsl files in Notepad++ and do searches for:
+ " " +
"S "
"N "

and then change the values, if applicable, to remove the spaces. Then try it out and see if it fixed it.

Make sure to make a backup of the files first.

Big T said...

Hello Christopher, I am also attempting to do precisely what the last gentleman was...

I want to remove the spaces between the letters and symbols in the bearing call as follows: S 28° 56' 31" E to S28°56'31"E. How do I edit the (lineDirection) file that it is pulling this info from?

Which .xsl file are you referring to?

Christopher Fugitt said...

Here is a post with images and more information:
http://blog.civil3dreminders.com/2022/08/modify-xsl-reports-to-remove-spaces-in.html

LinkWithin

Blog Widget by LinkWithin

Ad