2012-09-18

Shaft Fits Disappeared

In AutoCAD Mechanical, there is a dimensional feature that can add ISO fit tolerances such as H7 or f6 and such. A user lost his list if fits and wanted to get them back. The problem was that his Mechanical VAL tables were lost (how, I do not know). To fix them, we copied a set from a working computer to "C:\Users\Public\Documents\AutoCAD Mechanical 2012\ACADM\GEN". We copied the VAL folder and all of its subfolders to get them restored.

2012-09-15

Boxed in text

This one doesn't come up too often, but when it does it is slightly hard to find. If you need to make a resizing box around your text in AutoCAD, try the TCIRCLE command. Just type in TCIRCLE and select the text you need to "box in", enter your preferences, and wala "boxed in text".

2012-05-17

Viewport Layer Changes on Creation In Layout

A user had his Viewport Layer change upon creation of the viewport from modelspace to paperspace. He created it in modelspace on layer AM_VIEWS and when creating the viewport in Layout Space, it would switch to the current layer. The solution was to go into OPTIONS >> AM_STANDARDS and check the state of the checkbox "Apply new settings to layers...". This setting can get out of sync at times.

2012-04-17

Commands and dialog boxes incorrect behavior

A user here began having strange behavior issues in his AutoCAD sessions. His explode and purge programs would not open as command line entries (even when he typed in "_PURGE", etc..). His LISP routines would pop up dialog boxes even when the variables were to set to keep them closed. Through a lot of diligence on his part, he found that the variable QAFLAGS might be the culprit. He looked at his setting and it was set to 17. All other users here were set to 16. He set it to 16 and tada, his AutoCAD is back to normal. A great find on his part. I hope this might help others.

2011-11-12

Exploding Arc Text in AutoCAD

We needed to explode the arc aligned text in AutoCAD to import it into another program. Exploding the text made it revert to the wrong text and using the Express Tools Explode Text did not work. To get what we needed we first added a text style with the font we desired. We exploded the arc text with "explode" command. We then selected all of the text, changed its style property to the style with the font we wanted, and then used the Express Tools "explode to text" command. This got us very very close to what we needed and worked out well.

2011-03-08

AutoCAD file refuses to open - stuck at 93%

I have had a terrible time with a group of dwg files that would not open. No matter what I did, they would not open (always stopping at 93% open). We create 2D dwg files from NX6 drafting files and have really not had any issues until yesterday. I tried opening the files in AutoCAD 2010, AutoCAD 2009, tried inserting like blocks, tried Recover, tried drag and drop. Nothing helped. Funny thing, I can open them quickly and smoothly in Dassault's DraftSight software (free by the way). Then I had an epiphany; I opened them in DraftSight and then removed the customer part file (a complex casting drawing made mostly of splines). Saved the file and what do you know, AutoCAD opened it up with no issue. Hmmm, I guess Autodesk could take a few pointers here and figure out how to open up dwg files better. I am back in business

2011-03-06

Outlook 2010 Macro - Repeat Appointments And Change Category

I was getting annoyed with the inability of Outlook to make a recurring monthly bill that I could change the color of individual bills to mark as paid. I spent a little time and came up with a macro to do it. The first macro lets you make one year of appointments that occur on the same day each month. A second button lets you select an appointment (bill) and make it change its category. It is simple but a few others had the same question elsewhere. Enjoy.

Public Sub Create_OutlookRepeatingAppt()

Dim appt As Outlook.AppointmentItem
Dim sName As String
Dim sDay As String
Dim lYear As Long
Dim l As Long
Dim lMonth As Long
'''''''''''''''''''''''''''''''''''''''
sName = InputBox("Input Name", "Input")
sDay = InputBox("Day of month", "Day of month")
lMonth = Month(Date)
lYear = Year(Date)

For l = 0 To 11

Set appt = Outlook.CreateItem(olAppointmentItem)
appt.Location = ""
appt.Subject = sName
appt.Body = ""
appt.Start = CDate(lMonth & "/" & sDay & "/" & lYear & " 12:00")
appt.End = CDate(lMonth & "/" & sDay & "/" & lYear & " 12:00")
'Appt.Label = "Personal"
appt.Categories = "PENDING" 'Create your own category for this
appt.Save
'Bump values if at end of year
Select Case lMonth
Case 12
lYear = lYear + 1
lMonth = 0
End Select
lMonth = lMonth + 1
Next l
Set appt = Nothing

End Sub

Public Sub Appointment_SetToPaid()
Dim appt
Set appt = Application.ActiveExplorer.Selection.Item(1)
appt.Categories = "PAID" 'Create your own category for this
appt.Save
Set appt = Nothing
End Sub

2010-12-17

Cloning To Bigger Hard Drive

I was bumping my Windows 7 computers head against its hard drive space limit and I wanted to clone the install to a bigger drive. I did not want to spend anything so after a search I found Clonezilla fit the bill. I was not changing any hardware except for the bigger drive (going from 250 GB to 1.5 TB). Using Clonezilla Live .iso, I created the boot CD. I plugged in the new drive as a second drive and made sure I formatted it first (NTFS within my WIN 7 Drive Manager). Formatting was necessary so the cloning would recognize it as a viable drive. I followed the instructions here to the letter. Read carefully because at one point you will want to switch to Expert mode to toggle a switch on. Afterwords, I unplugged the old drive and plugged the SATA cable to the new drive, rebooted, and crossed my fingers. What do you know, Windows wanted to do a chkdsk and after that, booted to the new drive like nothing had changed. That wasn't so bad. I now have plenty of space and my old drive will serve as a backup. As things change, I will probably wipe that drive and give a shot at creating an image backup of the current drive (another option in Clonezilla).

2010-12-07

Raster inserted without path

Our company has proprietary drawing files that we do not give to our customers for final documentation. Our customers now require that we give them these drawings. They understand that they are proprietary and do not require them to be in AutoCAD but still need to see them and have them with their title blocks in AutoCAD. The method to accomplish this is to insert a raster image of our drawing file into the AutoCAD drawing. To do this and not have the path or the raster image as a separate file, I use a method that was prescribed on the Cadforum.cz site. I open the tif in a raster editor (I use Infanview because it is free and works great), and then select COPY and then in AutoCAD select PASTE SPECIAL. From this I select DEVICE INDEPENDENT BITMAP. It puts it in as a OLE object and the path is blown away. I tried copy and paste from Explorer and also inserting as an OLE object but those methods did not work. One note. Even with this method, an issue arose with the image. After a save, the reopened file had a blank rectangle instead of the image. After many iterations of various settings, I think I have a fix. I analyzed the TIF image we were using to paste in the drawing. Always A2 size images worked but A0 and A1 failed often. Hmmm, I tweaked the image properties of the file (using IrfanView) and then saved it with the image at 50 percent of its original size and repeated my steps. What do you know. It opened back up after a save and the image was visible.

2010-12-02

Crosshairs at Isometric/Angles

A setting I always seem to forget is how to rotate the cursor/crosshairs to draw at different angles. A quick refresher: Variable SNAPANG rotates the cursor at the angle you specify. Variable SNAPSTYL toggles between and isometric cursor and rectangular cursor.

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

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.