Just notes from Opie A commentary on AutoCAD and Civil 3d

Using Layer States with XREFs

In the past, I’ve seen requests to use Layer States in a drawing that contains reference drawings, also known as XREFs. The requests typically want to reuse those layer states for additional drawings, however, they always seem to fail when dealing with XREF layers.

Continue reading...

Reformatting DMS Bearings in the Surveyor's Certificate Report

Recently, I was tasked with modifying the Metes and Bounds report found in the Toolbox of the Toolspace palette. This report is generated using an XSL template and also uses some javascript for some formatting.

Continue reading...

Change Pipe Network Flow Direction

Can I get a show of hands for how many of you wish you could set the default Flow Direction Method when creating pipes? That’s a lot of raised hands. Of course, you can create a pipe rule in VBA or .NET to have this automated. But that turns into a lot of steps, just to change this one setting for each pipe. Thankfully, Autodesk has allowed access to this property through AutoLISP.

Continue reading...

User Prompt with Keywords and a Default Option

A lot of routines need to request user input. Fortunately, AutoLISP allows for this through the many getxxx functions. There is even a way to restrict user input to predefined values. The getkword function allows the programmer to specify these predefined values.

Continue reading...

Freeze the Label's layer of a Civil 3D Object

Object Label Freeze Many times I’ll need to freeze Civil 3D labels found in referenced drawings (XREF). Unfortunately, the layer assigned to the label may not match the object’s layer. This means the AutoCAD LAYFRZ command will not freeze the expected layer.

Continue reading...