A place to put reminders on how to do things or commands that I will use rarely, but are useful to know.
Ad
Thursday, June 19, 2008
VBA Parcel Map Check Rounding Error
Wednesday, June 18, 2008
Civil 3D 2008 - VBA Report Errors
1. Angles are not rounded properly for DDMMSS formats for precision's less than 5.
2. Directions are not rounded properly for DDMMSS formats for precision's less than 5.
3. The format for numbers drops the trailing zeros (59.580' is provided as 59.58').
If you know of any others please let me know or where I can find a fixed Reports_Utilities.dvb.
fredbobchris@gmail.com
Wednesday, June 11, 2008
VBA Reports - Direction Fix
When you print out a report that included directions in DDMMSS format and you are using a precision of 4 the report will still print out the .0" value behind the seconds value (S45d34'34.0"E instead of S45d34'34"E). The following only works in 2008 and older. I don't have 2009 installed yet so I don't know if that program still has that problem. To get the .0 removed from the report do the following:
- Run a report that uses a vba report.
- Make a copy of the Report_Utilities file, the file may be found at C:\Program Files\AutoCAD Civil 3D 2008\Data\vba\Report_Utilities.dvb
- Type vbaide at the command line.
- Go to the Report_Utilities and the Format module.
- Change the code in the section that starts with Select Case angFormat
- Change the code to the following
Select Case angFormat
Case aeccFormatDecimal
sAngle = CStr(dAng)
sPostfix = sPostfix + " (d)"
Case aeccFormatDecimalDegreeMinuteSecond
sAngle = sDeg & "." & sMin & sSec & sCnetSec
sPostfix = sPostfix + " (dms)"
Case aeccFormatDegreeMinuteSecond
If angPrec < 5 Then
sAngle = sDeg & Chr(176) & sMin & "'" & sSec & """"
Else
sAngle = sDeg & Chr(176) & sMin & "'" & sSec & "." & sCentSec & """"
End If
Case aeccFormatDegreeMinuteSecondSpaced
If angPrec < 5 Then
sAngle = sDeg & Chr(176) & " " & sMin & "' " & sSec & """"
Else
sAngle = sDeg & Chr(176) & " " & sMin & "' " & sSec & "." & sCentSec & """"
End If
End Select
- Save the file and run the report and see if it works.
Report I was using was Parcel Map Check Report
Friday, June 06, 2008
Fixing the Surface Report
To make the change go into the SurfaceReport.xsl file using notepad or another editor and change the line that contains @area2DSurf to the following:
<td>Area 2D: <xsl:value-of select='format-number(./lx:Definition/@area2DSurf,"##.##")'/>
The "##.##" indicates it is going to round the value to two digits. If you want another precision just add or subtract #'s. Make the same type revisions elsewhere in the document and then save the file and run the report again. Make sure to create a backup copy of the report just in case you want to go back to the original file.
Here's another example:
Original Line of code:
<td>Volume Cut: <xsl:value-of select="@volCut"/>
Revised line of code:
<td>Volume Cut: <xsl:value-of select='format-number(@volCut, "##.##")'/>
From Word to SpecsIntact
Next make sure the SpecsIntact toolbar is showing. If not go right click next to a toolbar and select the SpecsIntact toolbar:To use the toolbar just select within the text you want to add tags to. For instance if I wanted to add text tags to this paragaraph below:
I would place place the cursor with in the text you want the text tags added to and press the Text toolbar item to place the tags. The program will had the correct tag to the beginning and end of the paragraph.Once you have gone through and added all of the tags copy the entire document and add it to a blank SpecsIntact file. You may want to create a new SpecsIntact file and paste within the document type tags.
Wednesday, June 04, 2008
Alignment Style
Monday, June 02, 2008
Adding Surface Samples to Sections
I may have miss understood the last question. Here's how to sample a surface after you have already sampled sections.
Right click properties for the Sample Line Group
Choose the Sample more sources... button on the Sections Tab in the properties dialog box.
Add the missing surface
Sunday, June 01, 2008
Another Reader's Question
Hi, i have a question for you, if you want. I’m a french canadien and my english is not perfect. I just want to do a cross sections with two surfaces but a create my sample lines and after i want to create multiple section but i see just one of my surface. How can a see my two surfaces and also see my volume difference?<\Blockquote>
First off perfect English is never required to ask a question. Since it sounds like you've already created the section views, I would suggest changing the style of the section you don't want to see to not show. So the section is there, but just not visible.