Thursday, May 22, 2008

The Elusive Suffix

Using a data connection, attach a shapefile to a drawing. Any of the object data can be labeled as shown below, but how can you add a suffix to the label? For example, if the acreages of parcels are included in the object data, it's more desirable to label "0.576 Acres" than simply "0.576."







Add an expression to the label:



Add the "Concat" text function:



Select "text property" and replace it with the object data property you wish to label:







Replace the "[date/time]" with the suffix needed. In my case, the word Acres as shown:



After the comma there is a space, a single quote, another space, and the suffix followed by another single quote.



Nice, but begs another question: What if the data was imported (MAP > Tools > Import) rather than attached, you danced the "attach and query" dance, and a text property was altered as shown?





Simply place your cursor to the right of the last word and type the suffix as follows:

, 'Acres'

Wednesday, May 21, 2008

Color Wheel

You know how it goes - looks great on the screen, plots as a black mass. You could tweak your plot settings for a month - or you could plot the color wheel.

AutoCAD has shipped with a color wheel since the beginning of time. If you're not careful, you'll lose hours wondering why your fill patterns don't plot properly only to find the issue is with your device, not AutoCAD.

In the example below I've plotted a school district over a city map to compare to surrounding county data; effectively 3 layers of information that need to be displayed transparently over one another.



I plotted it, it was a black mass. When this happens, open the color wheel, plot it using the out of the box acad.ctb, and see how the plotter reacts. Then adjust your layer colors or .ctb accordingly.

My laserjet doesn't care what I send to it, it has a mind of its own. It doesn't care what AutoCAD sends to it, it doesn't care what driver I use. Red plots as a light fill pattern, green is darker, no way around it. You can tweak dithering, greyscale, and pen settings all day, and you may find the answer eventually. But by plotting the color wheel first, you'll find how your printer or plotter wants to respond to AutoCAD without investing a lot of time.





This obviously leads to another gem: Creating a transparent fill pattern in Civil 3D. Create a polyline around the area, export it as an sdf or a shapefile, connect to it, stylize it, make it transparent - and it eats very little memory.



Friday, May 16, 2008

Why use Raster Design?

Raster Design is misunderstood and underestimated, period. In the past, we'd purchase Raster Design for a single reason - it could transform coordinates on the fly. If you download a QUAD from the USGS, it's likely in a UTM Zone - NAD 27. As most of us work in State Plane (in this day and age I hope you do), it's always been nice to import QUADs or Aerials and transform them to state plane as they were imported, and it's ridiculously simple:



When AutoCAD MAP was released, users seemed to forget about their good ol' Raster, but missing from MAP (for a while) was the ability to transform coordinate systems without doing the attach and query dance. Once MAP had the ability to connect to data as shown below, images could finally be tranformed on the fly and unfortunately, several people shelved Raster Design - big mistake.



I recently visited with a firm doing pipeline work in a stretch of land that ran over 70 miles; a QUAD is about 7 1/2 miles wide; do the math and they'll be importing 9 or 10 images to cover the area. If you're importing quarter quads (like aerials), that's 40 images to yield the same coverage, and you KNOW someone will need to see them in a single drawing (need obviously being a relative term).

Welcome Raster Design:



Import your images using Raster Design; crop them to cut out only the area(s) you need displayed; merge them together in a single, seemless, georeferenced image. MAP can't do that.

ECWs and SIDs will need to be saved as a different format for obvious reasons, but choose the PNG format and cut down the image file size considerably.

Friday, April 25, 2008

Ribbondashboardtoolpalette

From Help:

"Ribbon Tabs are composed of Ribbon Panels. Select a Ribbon Tab to edit its contents. You can add and arrange Ribbon Panels to manage how they are displayed on a Ribbon Tab. To add a Ribbon Panel to a Ribbon Tab, drag a Ribbon Panel from the Ribbon Panels node in the tree view to a tab in the Ribbon Tabs node of the tree view. Ribbon Tabs can be added to a workspace. Any changes made to a tab are reflected in all workspaces that have that tab. Ribbon Panels are composed of rows, which contain buttons and controls. Each panel is divided into two areas by a panel separator; the rows below the separator appear only when the panel is expanded. Select a ribbon panel to edit its contents. You can add and arrange rows to manage how commands and controls are displayed on a ribbon panel. To add a command or control to a ribbon panel, drag a command or control from the Command List pane to a row under a panel in the tree view. Ribbon panels can be dragged into ribbon tabs in a workspace; each tab will use the same definition of a ribbon panel. Any changes made to a panel are reflected in all workspaces (and all tabs) that have that panel. Tip: You can copy your existing toolbars to ribbon panels by right-clicking a toolbar in the CUI tree and choosing "Copy to Ribbon Panels"."

What?

RIBBONCLOSE

Thursday, April 24, 2008

Can't Add a Vertex to a Polyline?

Have you noticed object snaps don't work if you try to add a vertice to a polyline in AutoCAD 2009?

I'm not good with LISP, but I'm a helluva copy and paster. Try this rountine, I threw it together quickly, so don't thrash me if it needs tweaking for your particular case. You can copy the following text into the Notepad and saveas AV.LSP. As long as "something" is crossing the polyline where you need to add the vertice, this should do the trick. Look at it closely and I think you'll find it's easily tweakable.

(defun c:av ( / ss point snap echo olderr)
(setq snap (getvar "osmode"))
(setq echo (getvar "cmdecho"))
(setq olderr *error*)
(setq *error* break_error)
(setvar "cmdecho" 0)
(while (not ss)
(setq ss (entsel "\nSelect Polyline to Add Vertice To: "))
);while
(setvar "osmode" 32)
(while (not point)
(setq point
(osnap (getpoint
"\nSelect Intersection: ") "int"))
);while
(setvar "osmode" snap)
(command "break" ss "f" point "@")
(setvar "cmdecho" echo)
(setq *error* olderr)
(command "pedit" "last" "j" "all" """")
(prin1)
)

Since you'll be saving this as a .lsp file and not a .txt file, add quotes around the filename and Windows will name the file av.lsp and not av.lsp.txt

Wednesday, April 23, 2008

MTEXTTOOLBAR

You've started the MTEXT command, but the toolbar that used to appear above the editor, is now on a ribbon and you think you've COMPLETELY lost your mind because it isn't readily apparent.



See the light blue button? I didn't either...

Change your MTEXTTOOLBAR variable to 1.

I don't know, maybe it's me... doesn't this seem to make more sense?

Thursday, April 10, 2008

Activation Error 0.1.001 or 11.1.6011

After you activate and then restart your product, you receive error 0.1.0011 or 11.1.6011 and are required to reactivate.

It's an old problem, you need a Hotfix