Showing posts with label AutoCAD General. Show all posts
Showing posts with label AutoCAD General. Show all posts

Tuesday, March 22, 2011

AutoCAD 2012: GIS/Pipeline People to Breathe a Sigh of Relief with Enhanced Raster File Support

If you have ever worked with heavy raster images in AutoCAD, you know very well how painful the experience is. Especially for those people working with huge aerial / satellite imagery, it is nearly impossible to use TIF image format to represent a large area due to huge image file size. This is why compressed image formats like ECW (Enhanced Compression Wavelet), MrSID (Multiresolution Seamless Image Database) etc. are highly popular among these people.

The compressed images files are comparatively very small in size and are easy to handle inside AutoCAD drawings. These images required additional installation of plug-ins/object enablers prior to AutoCAD release 2012. The good news is that from 2012 onwards, these file formats are natively supported in AutoCAD, thereby requiring no additional installations. Here is a complete list of newly supported raster files.




Saturday, September 12, 2009

Creating Complex Selection Sets Using FILTER Command

It always make me wonder why the FILTER command is often overlooked by most of the AutoCAD users of current era, especially the newbies. It may be partially due to the fact that this command can get highly complicated at times depending upon the requirement. Ofcourse, it can be. But the power is always accompanied by complexity. Some of the advantages of this most powerful selection tool are;
  • Creating selection sets based upon multiple criteria
  • Creating logical groups without physically grouping it
  • Flexibility to use transparently in between the commands

To make it simple (sorry, if you find it otherwise ;-), let us go by a sample. I have a Piping & Instrumentation diagram in which I need to create a selection set of major and minor process lines along with the line numbers. The newbie designer has drawn some of the lines as LINE entity and rest of them as POLYLINE entity. All the major lines are placed inside 'MAJOR' layer and the minor ones in 'MINOR' layer. The line number is placed inside an attributed block reference named 'LINENO' which resides in 'LINE_NUM' layer. The image below illustrates the filter criteria for creating the above selection set.



This is a nested filter criteria that makes it little difficult to understand. Nothing to worry. Let us split it into smaller portions so that we can analyse it easily.Following is the description of each portion in the order as shown in the image.




  1. Object= 'LINE' OR 'POLYLINE'
  2. Layer = 'MAJOR' OR 'MINOR'
  3. Block_Name = 'LINENO' AND Layer = 'LINE_NUM'
  4. Result of Step-1 AND Step-2
  5. Result of Step-3 AND Step-4.

If you represent the whole thing as a logical expression, it would look like the following statement;

((( Object= 'LINE' OR 'POLYLINE') AND (Layer = 'MAJOR' OR 'MINOR')) OR (Block_Name ='LINENO' AND Layer = 'LINE_NUM'))

If you have a closer look at the filter, you will find that the innermost criteria gets resolved first and passes its result to the outer ones in nested filters. In the above case, the criteria to be executed at the final stage is the outermost one (Step-5).

This way, you can save very complex filters in your drawing for quick access at any stage of drawing development or review.

Tuesday, July 7, 2009

DATAEXTRACTION Means A Lot More Than Simple Attribute Extraction

How often do you use DATAEXTRACTION wizard for extracting some information other than block attribute data? I have often seen people leaving it behind for tasks like extracting specific text information mentioning that this tool is not powerful enough to get an accurate output. That's not true. Here I am going to show you how to extract a line list from a bunch of Piping & Instrumentation Diagrams (P&ID). The P&IDs contains a lot of other text objects. But with the help of some filtering options, you can extract only the required text information from the drawing.

1. Start DATAEXTRACTION wizard

2. Select the required P&ID drawings (Here I am using sample ones).

3. In the third page select only 'Text' as object type.(Tip: You can uncheck all entries simultaneously by using right click).

4. In the fourth page, select 'Drawing' and 'Text' in the category filter. Also select 'File Name' and 'Value' in the properties area.

5. In the refine data page, you will get a screen similar to the one shown below. This is the area where we are going to play our game. You will notice that the value field contains various text object values from different drawings. We need to confine the list to line numbers.

6. Now right click on the value column and select 'Filter Options' from the right click menu.

7. You will be provided with a filter dialog box as shown in the image below. For our purpose, select the 'Contains' list item from the first list box and type in a wildcard criteria *"-* in the second list box as shown in the picture.

8. Click 'Ok' to apply the filter. Now you can see the value column filtered to show only line numbers based upon the given criteria.

9. Click on 'Next' button and save the output as an excel file or table.


You can easily create various lists from your drawings irrespective of the data containers. Whether it be attribute or text, DATAEXTRACTION is powerful enough to pull the required data based upon different conditions. As the wildcard criteria plays a critical role in extracting the specific data, you need to be very careful to choose the right criteria in order to get proper results.

On a side note, I feel like the command name is a bit too long. It would be a lot better if it were something like DATAXTRACT or even shorter. Anyway, that's not a matter of a concern as we don't use this command very frequently.

Sunday, January 4, 2009

My New Year Wish - An Intermediate AutoCAD Product for 2D Designing & Draughting

Why? Let's have a look at the existing product line. ie, Vanilla AutoCAD and AutoCAD LT. You might be able to find an answer from there.

AutoCAD LT: The lack of strong application programming interfaces makes AutoCAD LT really handicapped in the perspective of a Power User or CAD Administrator. You can not use any of your custom commands developed using AutoLISP/VBA/Dotnet/ObjectARX inside LT. The remaining option called DIESEL is only good enough to make small macros. Not only that; the number of commands are limited as compared to the full version.

Vanilla AutoCAD: Very powerful platform for 2D as well as 3D designing and modeling. The disadvantage is that it's loaded with comprehensive 3D modeling and rendering engines which are not at all used by the 2D user. Believe me; I have never used any of the 3D modeling or rendering features for the past 4 or 5 years for official purpose. That means the 2D users are carrying a burden over their shoulders and have been quite unnecessarily paying for the unwanted features. They could work much faster, if all those unwanted features were not loaded over there. The recent versions of AutoCAD show that it is more inclined towards 3D development than the 2D ones.

The need of the moment is an intermediate AutoCAD Product, which offers the power of Vanilla AutoCAD customization and 2D features minus all the 3D/rendering features with an attractive price tag. In that case, managers don't have to think twice at the time of purchase/upgrade of the product as they normally would do. As of now, we are forced to use Vanilla AutoCAD as we have in-house discipline specific menus and associated programs.

I am sorry to have started the New Year in a rebellion mood. But we really wish to see such a product available in the industry. Please note that the above views and opinions are my personal ones and those don't reflect the views or policies of the company I am working for. I take this opportunity to wish you a happy and prosperous new year. May the New Year make our dreams (including the CAD related ones ;-) come true...!! Many thanks to all you people for visiting my blog.

Monday, October 6, 2008

Exploring AutoCAD Field Capabilities by Developing a Simple Field Calculator

We extensively use FIELD object these days for several purposes like creating a custom plot stamp or printing the filename in the title block etc. When we dig in depth, FIELD object will provide us with a lot of possibilities. Here is a simple calculator application using the 'Formula' inside the 'Object' category of field.

We are going to develop the calculator as an attributed block reference where you can modify the attribute values to get the result in another attribute. For this purpose, create on block with attributes FIRST_NUMBER,OPERATOR,SECOND_NUMBER and RESULT attributes and insert it into the drawing.

Insert the block and edit attributes in the Edit Attributes dialog. Leave the first three attributes as we are not going to do any field operations over there. Right click on the last attribute (RESULT) and select 'Insert Field' option as shown in the picture.


You will be provided with field dialog box. Select 'Objects' field category and choose 'Formula' from the field names. Now right click on the 'Formula' text box and choose 'Insert Field' option once again (See the picture).



Now an additional field dialog will show up. This time select 'Object' field name from the 'Objects' category. Select the inserted block using the small button located near the 'Object type' text box. Once selected, the block properties including the attributes will be shown up in the properties list box. Select the FIRST_NUMBER attribute from the list and click 'Ok'.



Repeat the steps 3 and 4 to include the attributes OPERATOR and SECOND_NUMBER in the formula text box as shown in the picture. That's it. Press ok to finish the procedure.


Try changing the FIRST_NUMBER, OPERATOR and SECOND_NUMBER values. if the FIELDEVAL system variable is properly set, you will see the result soon after the next regen.

If you want to know how to create 'Live Fields' inside a drawing, see the AutoClock post.

Tuesday, August 5, 2008

Quick Tip - A better way to handle heavy raster images

Isn't it really painful to work with huge raster images? Those who have worked previously know how irritating it can be. But you can reduce the pain to a certain extent by using some of the availabe options. Switching off the image preview is one of them.



As you can see, it takes time to generate the thumbnail preview of the image. The bigger the image size, the longer it takes to generate the preview. You can switch off the preview by clicking on the 'Hide Preview' button on top right corner of the dialog box. Once you have switched it off, the button caption will change to 'Show Preview'. When you finish processing the big files, you can turn the preview on by clicking on it.



I often work with large tiff images and this feature saves a lot of time for me.

Monday, October 15, 2007

How to Overcome the FIND Command Limitations

We know very well that the FIND command is doing a pretty good service by helping us to find various types of text objects inside the drawing such as single line text, multiline text, block attribute values, table text, dimension annotation text and hyperlink text. It will be too much to ask for, if we wish to add something else in the list. Here is a tricky way to find the other categories of text such as block attribute definition, RText etc. which can not be located using the FIND command.

Open the Quick Select dialog box using the QSELECT command. Select the 'Attribute' entry in the Object type drop down list. Next, select the 'Tag' entry inside the properties list. Now choose the appropriate operator and provide the attribute tag name in the 'Value' Text box. The specific attibute definition will be selected on clicking OK button. Type ZOOM (normal shortcut - z) and Object (Normal Shortcut - o) to zoom to the selected attribute definition.

Use the same procedure with Object type 'RText' and Property 'Contents' to locate an RText object.

Sunday, September 30, 2007

System Variables I Cannot Live Without - The Top Ten List

System variables have been one of the most important aspects of AutoCAD throughout its history.I wonder how complicated the life would have been without these tiny little masters. Here goes a few of them I cannot live without.
  1. FILEDIA - Suppresses display of the file dialog boxes. This is the culprit behind one of the most commonly asked questions by the newcomers about missing file dialog box.
  2. MIRRTEXT - Controls how the MIRROR command reflects text.Ignorance of this system variable may double your work at times.
  3. PICKFIRST - Controls whether you select objects before (noun-verb selection) or after you issue a command.For the beginners, I would suggest to keep the noun-verb selection off until they become familiar with the normal selection methods.
  4. LTSCALE - Sets the global linetype scale factor.It's required to be setup as per the drawing scale with each new drawing to get proper linetype display.
  5. DIMSCALE - Sets the overall scale factor applied to dimensioning variables that specify sizes, distances, or offsets.As in the case of LTSCALE variable, this is also required to be setup properly at the beginning of each new drawing to get proper dimension display.
  6. SNAPANG - Sets the snap and grid rotation angle for the current viewport relative to the current UCS.I often use this variable to draw something at a certain angle.
  7. EDGEMODE - Controls how the TRIM and EXTEND commands determine cutting and boundary edges.A must know variable for neat TRIM and EXTEND operations.
  8. ATTREQ - Determines whether the INSERT command uses default attribute settings during insertion of blocks.Setting it to 0 will avoid attribute prompts at the time of block insertion.
  9. MODEMACRO - Displays a text string on the status line, such as the name of the current drawing, time/date stamp, or special modes.Very interesting and powerful when DIESEL expressions are used inside.
  10. USERIx/Rx/Sx - Used for storage and retrieval of user-defined integer/real/string values. Very handy variables to store values for macro operations.
As you can see, it was really tough to select only ten out of hundreds of useful ones.Anyway, top ten is always top ten.Your top ten may vary depending upon the way and field of your work (For example 3D guys will have another story to tell you).If you feel that I have left out any inevitable ones, feel free to point it out here.Finally, here is a list of some system variables which could not make it to the top ten list, but still worthy enough to make your life a lot easier.
  • ISAVEBAK
  • DBLCLKEDIT
  • FIELDEVAL
  • DWGNAME
  • DWGPREFIX
  • CLAYER
  • SDI
  • HPGAPTOL
  • MTEXTED
  • REMEMBERFOLDERS
  • STARTUP
  • VTENABLE
  • INSUNITS
  • CTAB
  • ZOOMFACTOR