Tips & Tools Weekly (Vol. 13, No. 9)9 Mar, 2008
This Week's Software Tips
Congratulations February Winner!
Pare Down the GIS Data
"I often receive large datasets from state and county GIS departments and only need to utilize a small area of that data set. You can use query location condition filters to load specific areas to your drawing, but I often only need certain features from the data, and I would like to manipulate it as a drawing rather than a GIS dataset. Try using the Check-out Feature tool for this purpose.
"I often uncheck the Map Base (your drawing data) to see the GIS data loaded in a less-cluttered view. First, be sure your map data is loaded and the features are visible. Next, click on the feature you would like to have as a drawing (street, parcel, building, etc.). Finally, right-click the feature(s) and choose Check-out Feature. The feature is now a drawing that can be manipulated independently from the rest of your bulk map data. You can block it out for future drawings, change the fill patterns or color to highlight a parcel, delete unwanted areas, and more. You can even check in the feature when you're done if you need to maintain the integrity of the data. The possibilities are endless."
NOTES FROM CADALYST TIP PATROL: Great tip! This is an application of the Keep It Simple method. GIS data is desirable to clients and more readily available today. If you have it already, why not use it in your CAD drawings? Thanks for the good advice on managing the data as well, Trey.
Printing Plot Styles without Lineweights
"In the Plot dialog box of AutoCAD Map 2008, the option Plot with Object Lineweights is by default grayed out. There is no way of combining the Plot with Plot Style and the Plot with Object Lineweights options. So you can't plot with plot styles but without lineweights because if you unselect them both and then try to just select the Plot with Styles option, this automatically selects the Plot with Object Lineweights too.
"I stumbled across a way to achieve this -- if you do things in the right order:
"You will then see that the grayed out Plot with Object Lineweights option is not selected and the Plot with Plot Style option is selected.
"I am unsure why Autodesk would choose to remove the user's choice by graying out some of these options in certain combinations. There are many times when I require the color table to print correctly but also require the clarity of fine print on smaller paper sizes where I am not fussed about lineweights."
NOTES FROM CADALYST TIP PATROL: Good trick. This tip also works in AutoCAD Map 2007. The lines seem to plot out very light, so it might not work exactly as you want. Another way to accomplish this is to create a plot style table where every color plots to a thin line weight (0.005" or 0.13 mm), then just plot as normal using this plot style table.
"The BCount command generates a list of block names and their quantities right in the Text window. This can help save time when you are asked something like, 'How many doors are on your floor plan?' Actually, all instances of all blocks are counted (except nested blocks and dynamic blocks whose visibility parameters have been changed). The data that is generated in the Text window can easily be copied into a word processing or spreadsheet program."
To use, enter Bcount on the Command line, then select Blocks. Your results will look something like this:
NOTES FROM CADALYST TIP PATROL: The Bcount command is a great way to quickly count blocks. Be careful using it, because if a block is exploded (gasp!), it won't be counted. Also be aware of blocks that were inserted twice, one on top of the other. You might only see one in the drawing, but Bcount will tally them both. Also note that Bcount doesn't work on dynamic blocks that have been changed.
The Dataextraction command is another, very powerful method of counting blocks in a file. It will automatically take that information and create a table. You can insert this table in the drawing or write an external file to disk without using the copy/paste method. You also can link the results to the drawing so that when the block count changes, the table or file will update. It can be overwhelming to use at first with all of the settings, but useful in the long run.
NOTES FROM CADALYST TIP PATROL: This is a nice little routine. Users could benefit from a bit more error checking, because if you mistakenly enter a non-numeric value in the Increment field and press the + or - button, AutoCAD completely locks up. Some users might not see the line update as you change the scale value as stated in the instructions; rather, the update will reflect in your drawing as soon as the dialog box closes.
Users also can change the linetype scale for an object using the Properties Manager. Select the line, then change the value of the Linetype Scale setting. Change the text and press Enter. The line is updated. Be aware that changing the LTSCALE setting per object will override the overall LTSCALE setting of a drawing and the scale of viewports. So be careful!
AutoLISP File Master Load
The second file required is MASTERLOAD.LSP. This routine gets the list of available routines from the LISPCMDS.LSP file and loads those for use. Place MASTERLOAD.LSP in your Startup Suite or add it in your ACADDOC.LSP file. All your routines will load when you open any drawing. Note that names and paths specified within these routines can be changed to suit your needs."
NOTES FROM CADALYST TIP PATROL: This routine is advanced for the average user, yet could be a good tool for managers to maintain some control over which routines users are loading. The file that lists the routines could be stored on a server and maintained by the manager or IT department.
For offices with one user, or for users that are unfamiliar with routines, we suggest using Appload. A dialog box lists the routines that are loaded in the file. Click on the Startup Suite icon to see a list of user-defined routines for AutoCAD to load. Browse to the routine that you wish to load and select it. No programming involved.
Another option would be to put each LSP file directly in the ACADDOC.LSP file, like this:
If needed, include the path in the load statement, for example
However, we suggest adding the AutoLISP directory to the AutoCAD support file search path. There is no need to load ACAD.LSP each time a drawing is loaded. This is what ACADDOC.LSP does. ACAD.LSP will load each time AutoCAD is started (assuming that your ACADLSPASDOC system variable is set to its default setting of 0) and ACADDOC.LSP loads each time a drawing is loaded.
Sharing Drawings with Xrefs
When you receive files from someone who has set up xrefs with the full path saved, try this approach.
Or, instead of ";" leave a blank line at the end.
The xrefs will not be found, of course. Run your script, and AutoCAD will find all xrefed drawings for that drawing. Now this drawing will have a relative path.
After you've done this once, anyone who needs to work with these files will not have any problems with the xrefs. This approach is an alternative to using a more conventional approach that modifies your profile, which isn't always desirable if you have several users sharing the same files."
NOTES FROM CADALYST TIP PATROL: Good tip. Keeping referenced files in a relative path is a good practice because it makes file management easier in many cases. A project folder name could change -- if so , then there goes your xref path, unless it is a relative path. Sending and receiving files with xref files is much easier to handle too.
If the idea of creating a script file frightens anyone, just open the file you want to re-reference and execute the Redir command. Then at the prompts, type in * and then .\ You will notice that these are the same commands given in the script file. The script file simply does the work for you if you want to. Xref files can be redirected to a relative path one file at a time too. Open the Reference Manager, go to the file path, delete the file path (keep the file name, of course), and replace the path with .\ code. If the referenced file is in a different folder, keep that folder and place in two slashes, for example: .\\SUBFOLDER\FILE.DWG
Note that when both drawings are in the same directory, no path can be used with the same result. When both drawings are on different servers or machines, then you have to use the full path.
Note also there's a bug regarding relative paths. Sometimes even if you have a valid situation, AutoCAD will tell you that it cannot assign a relative path. If you run into this, stop and save the drawing, then try again. It should work. This is documented in the Autodesk Knowledge Base.
Note: These follow-up tips have not been tested by the Cadalyst Tip Patrol.
Follow-Up: Memory Upgrade
Follow-Up: Text Find/Replace
Follow-Up: Cleaner Drawings Button
MicroStation Tip: Pop-up Calculator and Complex Expressions
Today's MicroStation tip courtesy of The Envision Group.
Back to Top
Openmoko Releases CAD Files for Neo Mobile Phones
Back to Top
Opportunities & Honors
Transoft Solutions Solicits User Feedback
Clearscapes Wins Firm of the Year Award
2008 Student Design Competition
Back to Top
Books & Training
AutoCAD Reference Book
Back to Top
The Week's New CAD and Related Products
AEC: Green TurboCAD Professional
CAD: QD Object Control
CAD: QD 3D Stretch
MCAD: VxScan v2
MCAD: VariCAD 2008
CAE: PAM-CEM Solutions
Facilities Management: ARCHIBUS v17
Back to Top
Mark Your Calendar
AutoCAD Civil 3D Test Drive
AutoCAD Architecture Test Drives
AutoCAD MEP 2008 Test Drives
Revit Structure Test Drives
BIM and Sustainability with VectorWorks Architect
For a complete list of CAD meetings, conferences, training sessions, and more, check out our calendar of events on Cadalyst.com.
Back to Top