Ad

Thursday, January 14, 2010

Old Funny Article

This article is from sometime in 1945, ran across it while scanning some old family photos.

I guess the "Greatest Generation" also had some duds.

Tuesday, January 12, 2010

Civil 3D 2010: Structure Descriptions

Civil 3D 2010 changed the way structure descriptions are populated when structures are created. The description used is the part family. In the past the description included size information.

The easiest way to get the old type description (after the initial setup) would be to create a custom pipe rule that would set the desired description. I’ve done some posts in the past that have covered how to create custom pipe rules, an AU paper in 2007 and you can also find some information in help.

As indicated in my last post this idea won’t work for Null Structures.

Sunday, January 10, 2010

Null Structures: Description

If you want to change the description of a Null Structure to something other than “Null Structure” you can’t. Civil 3D 2010 doesn’t let you change it, well you can change it but Civil 3D 2010 replaces it immediately with “Null Structure” after you change it in the API. Well it keeps the changed value stored, but it only will show as “Null Structure” in the program. Hopefully in a SP or future version they will allow us to change the value to a custom one.

Tuesday, January 05, 2010

Delete Duplicated Point Groups

This post comes from a suggestion from Matt:

“Here is another little tool idea for you. 

image001

When some drawings get inserted by others when they make a mistake, the default Civil 3d renaming is to tag a .1 value to the group name.  It’s a pain to remove, does the API have a way to remove groups that match those values?”

In this post I’m going to do the down and dirty of getting it the duplicated point groups removed. If you for some reason use “.1” behind the point groups this post won’t work or you’ll have to modify the code to work with how you work.

The code started with the SurfacePointsSample.dvb file that comes with Civil 3D. I deleted most of the items I didn’t need and then added the code below.

The first thing that needs to get done is to cycle through all of the point group objects in the drawing. Next I got the number of characters in the name of the point group, using len function. With this information I can then use the InStr to see if the “.1” is the last two characters of the name of the point group. To do this I use the length of the name string minus 2. This will start the InStr function before last two characters of the point group name. If the name contains the “.1” as the last two characters then cPos will have a value greater than 0. If the condition is met then the point group is deleted.

The only problem with this is that the Toolspace doesn’t refresh. To get the point groups to show up correctly you’ll need to refresh the point groups in the Toolspace.

Sub AddPointsToSurfaceTest()
' Always get the objects again since MDI is supported.
If (GetGlobalCivilObjects() = False) Then
MsgBox "Error accessing root objects."
Exit Sub
End If

Dim oPointGroup As AeccPointGroup

For Each oPointGroup In g_oDocument.PointGroups
Dim sName As String
sName = oPointGroup.Name
Dim cLength As Double
cLength = Len(sName)

Dim cPos As Double
cPos = InStr(cLength - 2, sName, ".1")

If cPos > 0 Then
oPointGroup.Delete
End If
Next

End Sub



Here’s the code in action: http://screencast.com/t/ZWIzYWIxO



If you want to save yourself some time you can purchase the completed code for $5 that works with Civil 3D 2010 and can be easily modified for prior versions using this post.




If you have any problems with getting the file after buying, Email me.

Friday, January 01, 2010

Got to Have a Goal

For the past year this blog has been running on my goals for the year. I did 201 posts last year, 51 more than my goal of 150. Traffic appears to be leveling out, as traffic was only up 121% compared to an increase of 290% the previous year. Most of the visits, ~65%, came from Google searches. Unfortunately it appears that advertising for Civil related products is down quite a bit. In April revenue fell 50% compared to March (which wasn’t all that high to start with) and stayed low throughout the year, most likely reflecting the current market conditions in the civil engineering marketplace.

For the next year I’m going to scale back my posts to the blog to a total of 52 posts. If the advertising bounces back or I am able to derive more income from this blog I’ll post more often.

image

LinkWithin

Blog Widget by LinkWithin

Ad