This is a collection of routines for extending Civil-3D. It is similar to the collection of Lisp routines for Land Desktop, except the routines are written to work in Civil-3D. That means some routines from Land Desktop are no longer here, and new routines have been added to address specific Civil-3D needs.
These routines are made freely-available to the general public.
This version of the library provides the following commands. You may wish to create aliases for the longer command names using the "Command Alias Editor" in the Express Tools (or by manually editing your acad.pgp file). I list the alias that we use for each command, but you are free to create your own. You may also want to create toolbar buttons to call some or all of the routines, or assign some or all of the commands to keyboard shortcuts (CTRL + a key).
BRKPT (alias:
BP)
Similar to Land Desktop's "Breaklines By
Points" command. Allows the user to quickly and easily
add breaklines to a Civil-3D surface by picking points in the
drawing. Useful for cleaning up surfaces and adding breaklines
that the field guy couldn't (or didn't) collect with figure
commands. Breaklines are drawn on the layer specified in the
command settings, and not on the current layer, so you don't have to
switch your current layer to use the command. Remembers its
layer and surface settings for each drawing, so the command always
start up with the settings you were using last.
LOTCORNERS (alias:
LC)
Creates Cogo points at the corners of all parcels
in one or more Sites. Uses the Next Point Number from the
Point Settings when creating the points.
PARCELOFFSET
(alias: POS)
Creates offsets with varied distances
around parcels. Useful for setbacks and utility easements that
run at differing distances around the lot, such as 7' along the
front, 5' along the sides, and 10' along the rear. Remembers
its settings in each drawing.
STAKEFEATURES (alias:
STKF)
Creates graded offset points along elevated
feature lines. Particularly useful for calculating stakeout
points for things like curb and gutter in parking lots. There
are a number of options to this routine. Points can be set at
even stations along the feature line, or at evenly-spaced intervals
along each segment. Only works on Feature Lines. Points
are automatically coded with tags like PC, PCC, GB, etc., which
improves clarity and helps produce better staking reports.
PT2FEATURE (alias:
PTF)
Datum-adjusts existing points, based on existing
linework. Select the points you want to change, then select
the linework to use. Points are datum-adjusted to match the
nearest point in the selected line. You may also optionally
enter a vertical-offset or grade percentage, which further adjust
the point elevation. (Grades are applied identically on both
sides of the feature line, e.g., a grade of -2.0% indicates the
grade slopes downward at a 2% slope on both sides of the line.)
This routine works on most types of linework, including lines, arcs,
polylines, and Feature Lines. The linework is typically
extended out to infinity, so points beyond the endpoints will
typically receive a projected grade. Points on the outside of
angle points receive the grade at the angle point.
SGRD
Straight-grades
existing points, based on selected points. You may select two
or more points (using standard OSNAPS) to use as "reference
points", then select the Civil-3D Points you want to
datum-adjust. A temporary "reference polyline" is
drawn through the "reference points" as you select them,
and then the "reference polyline" is used to datum-adjust
the points using the PT2FEATURE command. This command
therefore works in much the same way as the PT2FEATURE
command. Note that "reference points" can be any
point (X,Y,Z) that you can pick with the Autocad cursor, and do not
have to be Civil-3D Points. If you wish to pick a Civil-3D
Point as a "reference point", use the "Node"
OSNAP.
ROTPTS (alias:
RT)
Rotate point symbols to the specified angle.
(Routine contributed by Jeff Mishler.)
FREEPT (alias:
FR)
Displays a list of available point numbers in the
command window.
NEXTPT (alias: NX
or XX)
Sets the next point number in the Point
Creation Settings from the command window.
ZOOMPT (alias: ZZ)
Zoom
to a Point by typing the point number on the command line.
LABLAY (alias: LB)
Pops
up a dialog box for quick modifications of the layers that General
Note and Line/Curve Labels are placed on. Particularly-useful
when assigned to a keyboard shortcut (CTRL + a key, or a Function
key such as F4). This is basically a convenient
shortcut to the settings found in the Drawing Settings, on the
"Object Layers" tab. I have now also added the
Drawing Scale to this dialog, so the Drawing Scale can also be
changed using this command.
FIXSCALES (and UNFIXSCALES)
This causes
LTSCALE and PSLTSCALE to equal 1 in paperspace, but LTSCALE =
Drawing Scale and PSLTSCALE = 0 in modelspace. In addition, it
sets DIMSCALE = Drawing Scale in modelspace, and DIMSCALE = 0 in
paperspace (DIMSCALE = 0 causes dimensions to size correctly both in
paperspace and in modelspace viewports located in paperspace).
The DIMSCALE maintains its setting even when the user changes the
active DIMSTYLE from the dropbox in the STYLES toolbar (but not when
the user changes the DIMSTYLE from the Dimension Style Manager).
You may wish to run this command from the NETLOAD command that loads
the DLL, as explained below, so that it is automatically enabled
every time you start Civil-3D. The UNFIXSCALES command
can be used to disable this functionality at any time, and it can be
re-enabled by issuing the FIXSCALES command again.
NOTE: since this routine is not run when documents are
printed from the Sheet Set Manager, you may want to get into the
habit of switching to paperspace before saving DWG files that
contain plot layouts. That will ensure that the drawing is
saved with LTSCALE=1 and PSLTSCALE=1. Otherwise, drawings may
not print correctly from the Sheet Set Manager. A future
version of this routine may override the Autocad SAVE command to
force the drawing to be saved with LTSCALE=1 and PSLTSCALE=1, which
will fix this issue.
NOTES FOR 2008 VERSION: Since 2008
introduced the Annotation Scale, the alterations to LTSCALE and
PSLTSCALE have been removed. Instead, set MSLTSCALE=1 and use
the Annotation Scale to control the display of linetypes in
modelspace. This allows you to set the values of LTSCALE and
PSLTSCALE as you desire. This routine will still apply
DIMSCALE overrides, for use with DIMSTYLES that are not
"Annotative", but that is all it does in the 2008 version.
There are a number of ways to install the DLL. The easiest is to download the appropriate version and place it in a convenient location. Then include the following line in your ACAD.LSP file (if you don't have an ACAD.LSP file, simply create one in a text editor and put it in a directory in your support path):
(command "netload" "C:/My DotNet DLL Deployment Directory/SincpacC3D.dll" "FIXSCALES")
Or, if you don't want to enable the FIXSCALES support at startup, use this line in your ACAD.LSP file, which omits the call to FIXSCALES:
(command "netload" "C:/My DotNet DLL Deployment Directory/SincpacC3D.dll")
If you place the .DLL on the network, you may have to adjust permissions to allow it to run. One way is to open a Command Prompt window, navigate to the .NET 2.0 installation directory on each user's machine (usually located at "c:\windows\microsoft.net\framework\version\") , and type the following command:
caspol.exe -machine -quiet -addgroup 1 -url "file://MyServer/My DotNet DLL Deployment Directory/*" FullTrust
Instead of changing permissions with CASPOL, you can also write a script (i.e., a Windows Logon script) that copies the DLL from the network to the local user's machine. This has the benefit that you can update the DLL on the network drive whenever you wish. Then, each time a user logs on to their machine, the script copies the DLL from the network to the user's local machine, ensuring the user has the latest copy of the DLL. If you let each user mount the DLL from the network drive, you may need to force all your users to shut down Civil-3D whenever you want to update the DLL.