« Acad 07: Grab Render Images | Main | Commentry on the Airbus Delay »

Oct 30, 2006

Acad 07: Undocumented MaterialAssign Command

AutoCAD always has numerous undocumented commands, and here is one that I missed when I scoured AutoCAD 2007 earlier this year for my "The Illustrated AutoCAD 2007 Quick Reference" book (Autodesk Press).

I had found it curious that AutoCAD 2007 has a MaterialAttach command for attaching materials to layers, but no command for attaching materials to objects. (The workaround is to drag materials from the Tool palette onto the object.)

By accident this evening, I typed in MaterialAssign and found it works like this:

Command: materialassign

Notice that the paintbrush cursor appears.

Select objects: (Pick one or more objects.)
Select objects or [Undo]: (Press Enter to exit the command.)

Hmm... it never asked which material to assign to the objects. It turns out that this command uses whichever material is stored in the CMaterial system variable. When changing the value of this system variable, you have to use quotation marks when the material name contains spaces, like this:

Command: cmaterial
Enter new value for CMATERIAL <"ByLayer">: "Metals.Structural Metal Framing.Steel"

In the end, it is easier to just drag materials off the Tool palette and onto objects.

Comments

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been saved. Comments are moderated and will not appear until approved by the author. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment

Comments are moderated, and will not appear until the author has approved them.

Search This Blog

  • Search 2,000+ Posts:
     

Advertisements


Blog powered by TypePad
Member since 12/2003