. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
This Week's Software Tips
Get the Code!
Cadalyst 's September code from Hot Tip Harry is available for download. This month's top tip is Connect the Blocks by Paul Martinez, a routine that automates the drawing process for irrigation plans and other applications by drawing lines between the insert points of selected blocks.
Super-Fast Batch DWG File Migration
Reader Angus Lee wonders if anyone else gets frustrated when migrating numerous DWG drawing files that are organized in various folders and subfolders. Here's his tip that can help you with this tedious job.
"The most time-consuming part is selecting files. In the Desktop File Migration Utility dialog box (included with Autodesk Mechanical Desktop 2007), you are prompted to add the drawing files required for migration. Let's say you have 3,000 files, and these files are saved (organized) in 800 folders and subfolders. It would be very time-consuming and tedious to add the drawing files one by one, because you'd have to search through all the folders and subfolders, select the drawing files, and then add them to the migration list." Luckily, he says, there is a workaround in which you take advantage of the Windows Search, Cut and Paste, and Undo functions:
- First, back up all the drawings you want to migrate by copying them to a new folder.
- Create a redundant folder called TEMP or any name you want.
- Locate the top folder where your drawing files are saved. Use the Windows Search function to filter out a list of all the drawing files required for migration by typing *.dwg in the Search Results dialog box.
- Move all the drawing files that are filtered out to the redundant TEMP folder by using the Windows Cut and Paste functions.
- Start the Autodesk Mechanical Desktop File Migration Utility. The Desktop File Migration Utility dialog box appears.
- In the File Selection process, click the Add button, browse to the redundant TEMP folder, select all the drawing files and add them to the migration list.
- Follow the rest of the prompts in the Desktop File Migration Utility dialog box.
- Once you have finished the File Migration process, go back to the Search Results dialog box. Click the Edit file menu and select Undo Move. All the drawing files that are filtered out move back to the original locations.
- Now that all the drawing files are migrated and in their original locations, you can delete the redundant TEMP folder.
A word of caution: This workaround works as long as all the drawing file names are unique. If there are duplicate file names, a Confirm File Replace dialog box appears asking you whether you want to replace the existing file in Step 4 above. In this case, click No and continue the process. Make note of the location of the file(s) that you didn't move. You will have to manually migrate those files.
This workaround also works for DWG TrueConvert (included in DWG TrueView from Autodesk). Just use the same procedure as above to add the drawing files to the conversion list.
NOTES FROM CADALYST TIP PATROL: Our expert Mechanical Desktop Patroller lets us know that this is a very helpful, great tip. Thanks, Angus!
No More Stiff Neck
Like many of us, after years of working on the computer, John J. Damman must wear bifocals. During the years, he's found that he must place all AutoCAD toolbars at the bottom of the screen or he ends up with a stiff neck from looking up all the time. He explains, "I discovered that the Properties dialog box, the Command line, and the Dashboard can float on the screen out of the way until I need them. The Dashboard has seven control panels on it that I can turn on and off at will. I leave the 2D Draw control panel on at all times. This alleviates the need for a toolbar taking up valuable space on the screen. The Command line is reduced to a small rectangle in size. I can always use the F3 button to enlarge the commands if I need them. There is also a transparency setting available for the Command line and the Dashboard if that would be helpful."
NOTES FROM CADALYST TIP PATROL: Good tip! Note that all palette-based items can float as described here.
Frequent tipster Leonid Nemirovsky (visit his AutoLISP Web site) writes, "To delete layers, you usually use the Laydel command. This works great in general, but you must select the objects or type the name of the layer to be deleted. The problem comes when you can't see the objects or you need to get rid of more than one layer. When you have 5-10 layers like this, typing becomes time consuming. To solve this issue, draw a line on each of the layers, make that layer current, and then run the Laydel command and pick those lines."
NOTES FROM CADALYST TIP PATROL: Good tip! Thanks, Len.
A second tip from Leonid Nemirovsky involves combining mtext in AutoCAD. Len explains, "If you need to combine a couple of pieces (or more) of single-line mtext, first explode each one using the Explode command. Then use the Express tools command Txt2mtxt to combine the single-line texts into one mtext."
Another option is use his small routine to combine different segments of mtext into one:
(defun c:mmt (/ first delete second delete1 mtx1 mtx2 mtx ed) (prompt
"\nTo merge two MTEXT entities") (setq first (entget
(car(entsel"\nSelect first MTEXT entity: "))))
(if (= first nil)(exit))
(setq delete1(cdr(assoc -1 first)))
(redraw delete1 3)
(setq second (entget (car(entsel"\nSelect second MTEXT entity: "))))
(if (= second nil)(exit))
(setq delete (cdr(assoc -1 second)))
(redraw delete 3)
(setq mtx1 (cdr (assoc 1 first)))
(setq mtx2 (cdr (assoc 1 second)))
(setq mtx (strcat mtx1 "\\P" mtx2))
(command "erase" delete delete1 "")
(setq ed first)
(subst (cons 1 mtx)
(assoc 1 ed)
NOTES FROM CADALYST TIP PATROL: "The LISP routine works as advertised. It would even be better if you could combine an unlimited number of mtext entities."
Our patroller adds, "Another way to combine two mtext entities is to edit the string you want to delete. While in the editor, press Ctrl+A to select all the text, then Ctrl+C to copy to the clipboard. Exit the Edit mode, then edit the other mtext entity, move your cursor to the end and press Ctrl+V to paste in the copied text. Finally, erase the first mtext entity."
MicroStation Tip: Align Tool in MicroStation
Let's say you've got a bunch of text elements that need to be left aligned because they were placed without regard for alignment and look rather sloppy. To fix this, use the Align Edges tool and have it done in no time flat. This tool works on any element type and makes it quick and easy to align elements to others along the top, bottom, left, right or center points of the element. Link here for detailed instructions.
Axiom offers many MicroStation Tips on its MicroStationTips.com Web site.
Send in Those Tips!
The pace of life slows in the summer -- so they say -- and the same seems to be true for tips! Tips & Tools Weekly could use a few good tips for our readers who are hard at work this time of year. Send us your favorite tip, code, or shortcut you've devised to help you save time and/or do your job better. We welcome tips related to all CAD software systems. If we publish your tip, you'll receive a Cadalyst T-shirt, and one contributor will be selected randomly to receive a monthly $100 prize.
Submit Your Tip: E-mail your tip, code or shortcut for your favorite CAD software. If we publish your tip, we'll send you a Cadalyst T-shirt, and each month Cadalyst editors will randomly select one published tip and send a $100 gift card to its author. Please submit only code and other tips that are your original work (or provide the original source so we can include proper credit) and tell us which software version you use. By submitting code, you grant Cadalyst the right to print and distribute your code in print, digitally and by other means. Cadalyst and individual authors retain all rights to the code; published code is not to be used for commercial purposes.
Tips & Tools Weekly software tips for AutoCAD are reviewed by Cadalyst staff and the Tip Patrol before publication. Use all tips at your own discretion, please, and watch later editions of this newsletter for updates and corrections. We're sorry, but editors and Tip Patrol members cannot provide assistance with technical problems; please refer to Cadalyst's Hot Tip Harry-Help discussion forum.
Sincere thanks to our volunteer Tip Patrol members: Brian Benton, Don Boyer,
Mitchell Hirschklau, R.K. McSwain, Kevin Sawyer, Ivanhoe Tejeda, and Billy Wooten.