Ad

Friday, June 18, 2010

Superelevation Report – Part 3

In the previous two posts I’ve collected the information and set up the code to output the information. Now I’ll set up the report to run within Civil 3D. The first thing I need to do is rename the name of the dll that is created once the project is built.  To change the name double click on the My Project folder in the Solution Explorer. Then change the Assembly Name, in my case I called it C3DReportSuper.

image

Once I ran the report I found that it didn’t run. The cause of this is because I didn’t add a command to run the report.

image

Adding in the command with the correct name corrected the problem, after closing and reopening Civil 3D.

image

I try again and end up with another error message:

 SNAGHTML4881df3

Looking at the code it didn’t like me deleting some references to TextBoxes, but pressing continue continues the code. But it looks like I have problems due to the code I removed for not having Microsoft Excel installed. Looking further into it the Source for the reports comes with the dlls for Excel and Word. They are located here:

C:\ProgramData\Autodesk\C3D 2011\enu\Data\Reports\Net

So if you don’t have Office installed you can find the required references there. A review of the code shows where it’s not being able to add the code. Some well placed ‘ stop the program from trying to add the list boxes that aren't there anymore.

image

Running the report again creates the report.

image

But we probably want all of the information on one line and have the Smooth Curve Length, Description and Type filled out.

To fix some of it, remove the lines with “&nbsp” and move the Station, Northing and Easting lines up in the code. Also remove the if then part of the code.

image 

And also add in the lines for the Smoothing Length, Description and Type, which I forgot to add in earlier.

image

Now running the report gives us the information we are looking for except for the Type. For the Type a cryptic number is provided. In another post I’ll convert the Type to Text so it shows up correctly.

image

No comments:

LinkWithin

Blog Widget by LinkWithin

Ad