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

2008-10-31

Impeding progress...

What is holding these things up? Well in the publishing world (AutoCAD Publish that is), a user kept getting a "Job Already In Progress" dialog popping up. He is one of the few users here who use Publish since we have an in house solution already for plotting but nonetheless we needed to solve it. A few searches hinted at a solution and it turned out to be that within the OPTIONS >> PLOT AND PUBLISH tab, the Enable Background Processing for PUBLISHING was set to ON. He switched it to OFF (unchecked) and he no longer has impeded progress. It is about time to live in the here and now. May the Lord Bless.

2008-10-10

Too much support

Well, Sometimes you just get too much support. How's that? Recently I began getting a pop up dialog that prompted me that the drawing I was opening had Mechanical objects that were saved to a version that made them incompatible. That is good info but I was using vanilla AutoCAD and I had never seen this come up before. It appeared from the command line to run a _amconsistencycheck command. I tried looking it up but to no avail. To make a long story short, I had added a new support path in my Options that pointed to the ACADM folder. Once this path was removed, the command did not come up automatically.