2010-10-28

AutoCAD 2009 Crashing

I had a lot of issues with AutoCAD 2009 crashing suddenly. Usually when logging back on when the screen-saver would lock the screen. I worked through the issue with Autodesk and come to find that it was a graphics driver issue. I have a Nvidia FX3700 and was using using the latest "approved" driver from Autodesk. Using the "Tune Log" within the "3dconfig" command in AutoCAD, I got a clue to what AutoCAD was doing with its graphics driver. To see the approved driver list go here:
http://usa.autodesk.com/adsk/servlet/hc?siteID=123112&id=6711853&linkID=9240618
I actually had to install the third oldest driver on the list to get a stable AutoCAD. The second oldest caused Windows blue screens and required me to boot into safe mode to restore it. I would suggest downloading all of the approved drivers before trying, so that they are available on the computer in case the worse happens.

Dimension Fits Missing

When we recently upgraded to AutoCAD Mechanical 2009 and a few users could not choose their fits when dimension (ie H7, f6, etc...). It took a while to figure out, but another user found the answer. There was file corruption with the fit data (VAL tables). We copied the files from a known working set (ex. ACADM 2009\Acadm\gen\Val) to the non-working AutoCAD computer (AutoCAD should be shut down while copying the files). The fits are back!

2010-08-17

Lost My Ribbons

I am not too sure of this AutoCAD yet. It seems Autodesk has taken so many privileges with poorly chosen default settings, quirky UI behavior, unwarranted crashing, and odd screen refreshing and behavior. Anyway, I digress, I lost my ribbon bar when I had shut down and reopened AutoCAD. Why? Who knows. Anyway, I tried a few things but finally found my answer. It may not work for everyone, but typing in RIBBON at the commandline brought it back. Back to work.

2010-08-03

Newly Inserted Items are Faded

What gives? A user created a block and it came in with faded colors. He then copied a block and it had faded colors. Hmmm.. When I listed the layers and the objects all seemed fine but it still looked faded. It was not in an edit mode of any sort. I researched and found what I thought was an unrelated variable LAYLOCKFADECTL which controlled the visualization of objects on locked layers (not the case here). When we set this variable to 0, we got our blocks back to vibrant colors again. Oh well, fading is gone, bewilderment still here.

2010-08-02

When the ISOCP font is too big

We are completing an upgrade from Mechanical 2006 to Mechanical 2009 (I know, we are a little behind the times) but when we opened drawings, the ISOCP font looked like ROMANS and grew outside the leader notes and Block references. We have the Style STANDARD defined as ISOCP.shx but it would not appear correctly. I found a fix. In the OPTIONS, under the FILES tab, expand the TEXT EDITOR, DICTIONARY, AND FONT FILE NAMES, and then set the ALTERNATE FONT FILE to ".". Shut down AutoCAD and then restart. Your ISOCP should appear correct.

2009-03-20

Get in (a)lign....

With text that is. Here is a text alignment snippet I wrote to align some text with a balloon leader (in our industry). It aligns selected text with along two selected points (could be along a line or anything else). Enjoy and get back in (a)lign.

Public Sub AlignSingleLineTextAlongTwoPoints()
'------------------------------------------------------------------------------
'
'
'------------------------------------------------------------------------------
Dim acTxt1 As AcadEntity
Dim vPt1 As Variant
Dim vPt2 As Variant
Dim dScl As Double
Dim dScl1 As Double
Dim dScl2 As Double
Dim dAng As Double
'''''''''''''''''''''''''''''''''''''''
On Error GoTo ErrHandler 'for escape key

Const d45 = 0.7853982 ' 45 degrees in RAD
Const d285 = 1.3089969 ' about 75 degrees in RAD
'''''''''''''''''''''''''''''''''''''''
ThisDrawing.Utility.GetEntity acTxt1, vPt1, "Select Text: "
dScl = acTxt1.height / 3#
dScl1 = dScl * 1.414
dScl2 = dScl * 4.123
'------------------------------------------------------------------------------
vPt1 = ThisDrawing.Utility.GetPoint(, "Select First Point: ")
vPt2 = ThisDrawing.Utility.GetPoint(, "Select Second Point: ")
dAng = ThisDrawing.Utility.AngleFromXAxis(vPt1, vPt2)
'------------------------------------------------------------------------------
'Set the alignment or else the insertion point cannot be overridden below
'REV 2007.12.21
'------------------------------------------------------------------------------
acTxt1.Alignment = acAlignmentLeft
'------------------------------------------------------------------------------
'Set the text insertion point
'------------------------------------------------------------------------------
acTxt1.InsertionPoint = ThisDrawing.Utility.PolarPoint(vPt1, dAng + d45, dScl1)
'------------------------------------------------------------------------------
'Set the text angle
'------------------------------------------------------------------------------
acTxt1.Rotation = dAng

Exit Sub

ErrHandler:
Select Case Err.Number
Case 0
Case -2147352567 'Escape hit
Err.Clear
Case Else
Err.Clear
End Select

End Sub

2009-01-26

Are you color blind?

AutoCAD has two basic types of printing styles. Color dependent and style dependent. If you are on the original Color based printing and want to convert your current drawing to this style. Try this little ditty.


Public Function ConvertToCtb()
Const sRet As String = """"
Dim sCmd As String
Dim sPstyle As String
'''''''''''''''''''''''''''''''''''''''
sPstyle = ThisDrawing.GetVariable("PSTYLEMODE")

If sPstyle = "0" Then
sCmd = "(command " & sRet & "convertpstyles" & sRet & " " & ")" & vbCr
ThisDrawing.SendCommand sCmd
End If
End Function