Ad

Friday, October 30, 2009

Scale Points, Retain Elevation

Matt did a post over at Civil3D.com did a post on scaling your points and keeping the elevations. The method takes a bit of work of exporting and importing the points. It didn’t sound like much fun to do so I decided to add a more automated way of doing the task and add it to the Civil 3D Reminders Pack.

I recycled most of the code, so I’m not going to include the code in this post. The main steps in coding for this is to get the original elevation of the point. Next the point is scaled utilizing the ScaleEntity Method utilizing the base point provided by the user and the scale factor. Next the code assigns the original elevation of the point, replacing the scaled value. The last step is to Update the point. If the points aren’t updated then they won’t be selectable by the user until the file is closed and opened up again.

image

If you want to see the rest of the code you can download the Civil 3D Reminders Pack source code from the Civil 3D Reminders Pack Webpage.

The Civil 3D Reminders Pack only works in Civil3D 2010. If you want something that will work in an earlier version try this code in VBA:

Option Explicit

Sub TrianglesOnOff()

Dim oAcadObj As AcadObject
Dim vPnt As Variant

' Have the user select a surface.
ThisDrawing.Utility.GetEntity oAcadObj, vPnt, "Select Point: "

If (TypeOf oAcadObj Is AeccPoint) Then
Dim oPoint As AeccPoint

Set oPoint = oAcadObj

' Define the scale
Dim basePoint(0 To 2) As Double
Dim scalefactor As Double
basePoint(0) = 0: basePoint(1) = 0: basePoint(2) = 0
scalefactor = 1.5
Dim dElev As Double
dElev = oPoint.Elevation
oPoint.ScaleEntity basePoint, scalefactor
oPoint.Elevation = dElev

End If

End Sub



You’ll have to add a prompt for the scale factor or change the factor each time you run the program.

Wednesday, October 28, 2009

SpacePilot Pro - 3Dconnexion

I recently got a SpacePilotPro to try out. I found the functionality of the device is better than the SpaceExplorer.

image

The LCD screen provides extra functionality. It’s like a mini third screen to keep track of email, calendar, tasks and RSS feeds. When scrolling through items you are able to open the item to the big monitors. The item at the top of the list is a listing of the function keys. You can assign different commands assigned to the various buttons on the mouse. The function keys are different for each program and are customizable.

Once you get used to the functions assigned to the keys it makes it easy to not have your left hand on the keyboard, there’s even an ESC key on the mouse. I’ve assigned most of the commands I use with my left hand to the mouse, such as copy, paste, paste special and regen. Along with the standard ESC, CTRL, ALT & SHIFT there is 10 function keys which may be assigned values.

image

Since I use the mouse mostly to move through the model the buttons on the other side of the mouse come in handy.

image

The buttons make it easy to change the view, such as left, right, front, etc…  Additionally there is a FIT button which Zooms to Extents in AutoCAD or adjusts the view in Google Earth to be looking straight down and the north being towards the top of the screen. There is an additional three buttons that let you restrict the movement of the mouse.

The mouse is so easy to use even my four year old daughter enjoyed using it in Google Earth.

The SpacePilot Pro recently had a price drop to $399 (down from $499).

Disclosure: I received the SpacePilot Pro from 3Dconnexion to try out without cost.

Friday, October 23, 2009

Alignment Length Report

Here’s a quick way to create a table of alignment lengths in a drawing. I’m starting with the code found here: http://style.civil3dreminders.com/pipenetworkquantities 

The first thing to do is to change the object we are looking for to Alignments.

image

Then change all instances of oPipe to oAlignment using find and replace and change the variable type to an AeccAlignment.

image

Next delete some code we don’t need and change the titles of the cells to something we do.

image

Next populate the data we need.

image

No delete a bunch of things we don’t need.

image

No run the program, and select the Pipe sheet at the bottom of Excel and realize that the columns are reversed. Go back and modify the code to put the data in the correct columns.

image

And then go back and delete the code that creates the sheets we don’t need.

image

Now run it and the alignment information should be populated into Excel.

The code may be found on this page: http://style.civil3dreminders.com/alignmentlengthreport

Thursday, October 22, 2009

Moving Surface Labels From One To Another

Sometimes you may want to move labels from one surface to another surface. Maybe you promoted a surface and now have a new datashortcut surface to label. You can delete the information that makes up the old surface and then paste the new surface into the old. The labels in the old surface now will reflect the new surface data.

Here’s a simple Screencast of the steps: http://screencast.com/t/hwUjY3PrZdB

Wednesday, October 21, 2009

Version of Civil 3D 2010

Before Civil 3D 2010 SP2 was released it was difficult to find out what version of Civil 3D 2010 you had. You needed to know the secret handshake password to get it (AECCVERSION), and then know how to decode the file version. After installing SP2 the version shows up in the ABOUT screen, no need to remember the secret handshake.

image

Brian Kling also posted about it at Being Civil as an addendum to the original post telling us all the secret handshake and decoder ring.

By the way the reason I had to check my version is because the Subscription Advantage Pack is available for Civil 3D 2010 (and a bunch of other Autodesk software).

LinkWithin

Blog Widget by LinkWithin

Ad