Ads

How to Get the Distance and Angle Between Two Points In Autocad


Here is another useful autocad trick that can help you obtain the distance and angle between two points in autocad :

1. Type command DIST. You can also click on menu Tools, then click on Inquiry and then click Distance.

2. When autocad prompts for the first point, click on the first point.

3. Then click on the second point and hit enter.

4. At this point, autocad command line should show you the distance and angle between the specified points.



How to Replace an Dimension Text with a New Text in Autocad


If you want to modify or replace the existing text in an autocad dimension text object with a new text then do the following steps:
1. Type command DDEDIT. You can also go to Dimension menu, then click Object, click on Text and then Edit.
2. Autocad will prompt you to select the dimension text to edit. Just select the dimension text wherein you want a text to be replaced or edited.

3. A text editor will appear. In it replace or edit the dimension text with a new one.


How to Override a Dimension Style in Autocad


In order to override a dimension style, you must first set up a dimension style overrides and then apply the dimension stye overrides you just created.

Here's how to set up the style overrides:

1. Type command DIMSTYLE. You can also go to menu Dimension and then Click on Dimension Style.

2. The Dimension Style Manager dialog will show up. Under the styles, select the dimension style for which you want to create a dialog and then click Override.

3. The dialog box Override Current Style will appear. There are several tabs in this dialog box, click on them and make the appropriate changes for your override dimension style. Then Click OK.

5. You should see the dimension style override you've just created in the dimension style name list. Click close to exit the dialog.

Now that you have created the style override in autocad, you can now apply the dimension style overrides.

To apply the dimension style overrides, do the following steps.

1. Type DIMSTYLE.

2. This shows up the Dimension Style Manager dialog. Click Override.

3. The Override Current style Dialog will appear. Here, enter the style overrides and then click OK.



How to Rotate Dimension Text In Autocad


Many times we need to rotate a dimension text in autocad. Rotating a dimenstion text in autocad is an indispensable procedure that every autocad draftsman should learn. We need to rotate a dimension text to clearly label the dimensions of our drawing objects. The following are the steps on how to rotate a dimension text in autocad.

1. Type command DIMEDIT. You can also go to the menu Dimension, click on Align and then to Angle.

2. Autocad will prompt you to select the dimension object to edit. Just select the dimension text you want to edit.

3. Finally, enter the angle for the dimension text.


Moment of Inertia Area and Perimeter using Autocad


This tutorial will teach you how to get the moment of inertia, area and perimeter of a drawing entity in autocad. Ok, well as you might already know not all kinds of drawing objects or entities can be extracted with moment of inertia, area and perimeter. What we are talking about here are closed figures such as rectangles, squares, trapezoids, circles and any irregular shapes that are closed or closed polygons to be specific. However, before can we can get the properties mentioned above these drawing objects must be first converted into regions.

To convert a drawing object into region, do the following:
1. Type "region" in the command prompt.
2. Select the drawing object and press enter. The drawing object should be an autocad region at this time.
3. However, if your drawing object has a hole inside, say a pipe which must be composed of inner and outer circles, you must convert each circle into a region and then subtract the inner circle region from the outer circle region. To do this, type "subtract" in the command prompt, press enter and select first the outer circle and then the inner circle. By this time, you should already have a pipe region. Now, there is still one more important thing that you need to do. You must verify that you have indeed created the pipe region. Point your cursor into the outer circle. If both the outer and inner circles highlight, then you have successfully created a pipe region otherwise you need to start over.
Now that you already have a region, you are now set to get its moment of inertia, area and perimeter. The magical command here is "massprop" which stands for mass properties. Here are the steps:

1. First, you need to get the centroid of the region and then use that property to set the the User Coordinate System (UCS) to zero. Type in "massprop", press enter and select the region on your autocad screen and press enter again. By this time, Autocad will show the properties Area, Centroid (x, y), Perimeter and Moment of Inertia among others in the command prompt. To get a complete view of these properties scroll down the command prompt or adjust the command prompt window. The Area and Perimeter properties are final however the moment of inertia is not.

2. To get the correct moment of inertia, you need to set the origin of the UCS into the current centroid of the region. To do this, get the value of centroid (x,y) you obtained in step 1. Type "ucs", press enter, type "m", press enter and then type in the centroid values in this format x,y ( say 12233.0230,323.9441 ) and press enter. The origin of the UCS should now be at the centroid of your region. Type "massprop", press enter, select the region and press enter again. Autocad command prompt should now show the correct moment of inertia. As a check, if you have done everything right the centroid values you obtain this time must be 0.00,0.00 otherwise you made a mistake in entering the centroid values from step 1 into step 2. If this happens, just start over from step 2.


Autocad Custom Commands and Autocad Plugins


Just like any software plugin, an autocad plugin is a computer program that extends the capability of the autocad software. In windows softwares, plugins are computer programs that have an extension '.dll' which stands for dynamic link libraries. In autocad, autocad plugins have extension '.arx' which stands for Autocad Runtime Extension.







Actually, '.arx' programs are also dynamic link libraries. In fact when these programs are compiled from C++ programming language, the compiler outputs a default file with '.dll' file extension. Autocad plugin programmers are encouraged to replace the extension with '.arx' to distinguish the program as an autocad runtime extension. These autocad plugins are also called ObjectArx programs.



There are actually other types of computer programs that can extend autocad capability aside from ObjectArx programs. These are the LISP and VB programs. However, these programs don't have as much power as the ObjectArx programs. In fact, these programs are not called plugins but simply autocad automation scripts. Though they can also be compiled into
binary files, their script form is more than enough to serve its purpose. ObjectArx applications are strictly in binary file because they must be written in C++ language and therefore must be compiled into binary files.



Autocad plugin programmers use the Microsoft Visual C++ IDE to write and complile their plugins. They also have an above-average level of mastery of the C++ language. Most importantly, they master the ObjectArx API (application programming interface) which contains the classes and functions needed to control autocad and add more powerful functionality to it.



So what are the capabilities that an autocad plugin add to an existing autocad software? Well, it simply adds custom commands to your favorite autocad command list. How long does it take you draw a grid of horizontal and vertical lines





that vary in spacing? Using the primitive command, you will draw a line, type offset command, enter distance, offset, enter distance, offset...you do this long, boring and tiresome routine over and over. With an autocad plugin, you just type the custom command (say 'cells' for the superdraftsman_commands.arx found in this blog/website) of an autocad plugin and enter the different dimensions and you are done!. The grid lines with varying spacing are on the screen just like magic! Do you want to draw a window elevations? Just type custom command 'window' of an autocad plugin, enter the required dimensions and voila your window elevation appears right there on the center of your computer screen! The amount of time and effort save is so big that instead of spending time on drafting, you will now spend more time on your design!





Developing autocad plugins is not only limited architectural or drafting applications, structural autocad plugins can also be developed for the use of structural engineers or architects who want to check their drawings for structural integrity. As you might already observed in the superdraftsman autocad plugin (see my previous posts to know more about this plugin ) that I have developed, most of the custom commands added on it are intended to automate drawing tasks such as pipe, grids/cells, windows, sections etc. These custom commands simply draw objects on your autocad program fast but they don't help you determine if these objects, which represent real structural sections or members, can withstand a specified load.



In order to take the development of autocad plugins to the next level, I am planning to add structural custom commands to the superdraftsman making it an official structural autocad plugin. The following are the structural custom commands I plan to include:



1. comstren . One of the structural custom commands will let you calculate the strength of given section or structural member. After a section is drawn using the previously developed custom commands of the said plugin, a new structural custom command "comstren", short for compressive strength, will be entered into the autocad command line. The program will then ask for the kind of material to be used: steel, concrete or aluminum. Since this command calculates the axial compressive strength of a structural member, it asks for the unbraced member length. After this dimension is provided by the user, the autocad plugin calculates the axial compressive strength using the appropriate design codes (see below).






2.tenstren. This is short for tensile strength. This structural autocad custom command will calculate the tensile stength of a section drawn using the superdraftsman autocad plugin. When a section is already created, you will simply type the command "tenstren" , you will be prompted to pick the section and enter the type of material. Then, the plugin will calculate the tensile strength of the section. Note that this time, the plugin will not ask for the length of the member since tensile strength is independent of this parameter.



3.benstren. This is short for bending strength. This autocad custom command will calculate the bending strength of a structural member using a given section. Assuming that the section is already drawn on the autocad window, you type the command "benstren", enter the laterally unbraced length, enter the uniform load throughout the member length and select the section to be used. Then, the plugin will calculate the bending strength using the applicable design code below.





AISC(American Institute for Steel Construction) 2005 for Steel
ADM(Aluminum Design Manual) for aluminum
ACI (American Concrete Institute)



That's all for now. But I am planning more structural custom autocad commands to be added in the plugin.




How to Print / Plot Multiple Layouts All at Once in Autocad


You probably have experienced that when you have your drawings in multiple layouts you have to print/plot them one at a time.
So if you have 20 layouts in a drawing file, you have to repeat the procedure 20 times as well which is so tedious, boring and a complete waste of precious time. Well, you don't really have to do that. There are actually steps to print/plot all your drawings just one time!
Here are the steps to print/plot multiple layouts at once in autocad:
(Note that these steps apply to Autocad 2005, 2006 and 2008. I haven't tried it in Autocad 2008, but I think the procedure will also work)

1. Select all the tabs. When you have a drawing file with multiple layouts, each layout has a corresponding tab. Thus, you will see multiple tabs at the bottom of the drawing window. To select all the tabs, first click the first tab, then hold the shift key, go to the end tab and click on it. All tabs should highlight at this point.

2.Now, right-click and in the menu that pops up click 'Publish Selected Layouts'. A Publish dialog box will appear. In this dialog box, click the Publish button to start plotting multiple layout all at once.


Turn All Layers On or Off at Once in Autocad


Sometimes we when we have several layers turn on we just want to turn them off or vice versa. To do this, we often turn then off one by one which is tedious. Well, it's time to say bye to that becuase in this autocad tutorial I'll teach you how to turn all layers on or off at a single time . So here are the ways to do it.
Solution A.
To turn off the layers:
1. Type the autocad command "LA" and press ENTER.
2. Type OFF and Press ENTER
3. Press ENTER, ENTER, ENTER. (that's 3 times)
4. This time the layers should be turned off except the current layer.
To turn on the layers:
1. Type the autocad command "LA" and press ENTER.
2. Type ON and Press ENTER.
3. Press ENTER, ENTER, ENTER. (that's 3 times)
4. This time the layers should be turned off except the current layer.


Solution B.
To turn off the layers:
1. Go to the Layer Manager.
2. Press Ctrl+A .
3. Click one of the lightbulbs.
4. At this point the layers should now be off.



Autocad Plugin/Addon and Autocad Mechanical Desktop, Autocad Architectural Desktop.


You have probably encountered the Autocad Mechanical Desktop and Autocad Architectural Desktop because they are getting popular these days. Well, these software packages are actually a combination of the typical Autocad software you have in your desktop computer and Autocad plugins . The core autocad engine, programs and dynamic link libraries, are basically the same to make it run and functional as a computer-aided drawing software. The only but most significant difference comes from the power of automation. Simply put, Autocad Mechanical Desktop and Autocad Architectural Desktop contain the tools (autocad plugins or addons) that make drafting way faster and easier.



Unlike typical or third party autocad plugins or addons, the autocad plugins in Autocad Mechanical and Architectural Desktop come built in them. When you buy these softwares, you don't have to do a separate installation of the plugins/addons. The software package comes with an installer that takes care all the things for you to run a fully functional Autocad Mechanical or Architectural Desktop. With a third party autocad plugin, you have to do a separate installation aside from the usual installation of your autocad software. However, these third party autocad plugins/addons, also come with their installers that automatically set up everything. But there are also third party developers that write plugins which doesn't have installers. To use the plugin, you have to load it using the command "appload" of autocad and type the custom autocad commmands
that come with it. These are ussually the case for free but fully functional autocad plugins and for those plugins/addons that are under beta release.



What makes the Autocad Mechanical Desktop stand out from your ordinary Autocad program and other CAD systems are the custom commands tailored specially for detailing mechanical drawings. With the Autocad Mechanical Desktop, you don't have to type long series of commands just to draw a particular mechanical part. You also don't have to repeat a tedious series of commands just to draw bigger, smaller or extended variation of a mechanical part. All you have to do is hit a custom command (autocad commands specific to this software) for a particular mechanical part and you are done. The same is true with Autocad Architectural Desktop. The only difference is that its custom commands are tailored for drawing architectural objects faster and easier.


Autocad Tutorial: Use OVERKILL Command To Remove/Clean Up Overlapping Drawings - Useful When Creating Regions


If you have tried several times to create a region but still failed, chances are you have overlapping lines or curves in your drawing object. These overlaps give problem to autocad to create regions successfully. So, they must be removed first. But what if you have a drawing object that is composed of almost a hundred lines? It would be very impractical to zoom in to each line to check for overlaps. Well, don't worry. Here comes the OVERKILL command!. Just type in "OVERKILL" and select the drawing and press enter. Your drawing should be free from overlap now and you can now start create your region. To create a region. type in 'region', select your drawing object and press enter. At this point, you should already have a region. If you fail to remove the overlaps, just set the OVERKILL command property 'fuzz' to lower value, if it says fuzz=0.0001 try set the value to fuzz=0.0000001. Then type in OVERKILL again.


Set/Convert From One Unit (say mm) to Other Unit (say inches) in Autocad Drawing


Though common drawing or engineering unit used now in many countries is system international, there are also other firms especially in the US that use the Imperial/English system.

Tools, Programs To Set/Convert From
One Unit (say mm)
to Other Unit (say inches)
in Autocad:



Thus, we ocassionally need to draw in autocad using inches. If you have a drawing in mm unit, you must to convert it to inches. Here's what you should do.


1.Type in the command 'D' and press Enter.

2. The Dimension Style Manager should appear. Now, set the Unit Format to Architectural. Pess OK, set Current and Close.

3. Type in 'UN' (drawing units) , press enter. Set the Length Type to Architecural and set the Insertion Scale to inches.
That's it! You're done.


How to Import Autocad Layers and Linetypes from One Drawing to Another Drawing


Sometimes we wish to copy a set of properties in a drawing to another. One of them is the Autocad layers and Linetypes. If we encounter a drawing with layers and linetypes that are excellent, we can't stop ourselves but do something to copy them. However sometimes we never do that if we don't know how to do it. Well, here are the steps that you can do. The steps are surprisingly very simple.
1. Go to the Design Center.
2. At the Design Center. Look for you the drawing file where you want to copy the linetypes and layers from.

3. Right click and Click Add to drawing.
That's it. You're done.


Which is better/best ObjectArx, VBscript or Autolisp in Automating Autocad?


If you really want to become a power autocad user, you have to learn autocad automation. It is not enough to just master all the autocad commands available in your autocad package. Even if you are fastest human on earth, you are still human and you always reach the peak or the ceiling. One of your limitation is time and in order to draw a drawing object entity, you have to do a series of repeatitive commands called routines. The long list of routines that we do to finish a task is what limits us from finishing more projects. Therefore, to be productive we have to find a way to automate these routines. After all, these are just routines. We learn nothing new doing them over and over.



Fortunately, Autocad comes with tools that can help us automate it: ObjectArx, VBscript and Autolisp. So the problem now is which of these tools should you use to become an autocad power user. Which is better than the other? And which is best: ObjectArx, VBscript and Autolisp?. Well, the answer actually depends on the type of user. By the way, when we talk about automation we are talking about programming or scripting. The things I mentioned are not just plain tools,
they require you to operate them a little more complex than simple tools we used to know. To those who does not know programming, don't be scared. Programming is actually very easy .It is just like giving instructions. Now back to the question. It depends on who uses the tool. For beginners, VBscript is the preferred language not to mention that it is also the most practical. If your purpose is productivity and you don't want to spend more time programming/scripting, then go ahead learn how to automate autocad using VBscript. Go to your autocad help menu and you'll find a button that points you to the documentation and tutorials.



The last two: ObjectArx and Autolisp belong to those who has little experience in programming. Actually, even if you don't have experience in scripting languages, you can still learn AutoLisp. This scripting language is way simplier than objectArx. The good thing about Autolisp is that it has the power of ObjectArx but its codes are very simple and short. A single line of code in Autolisp could be several lines of code in ObjecArx. A simple capability that they both have is the ability to add autocad custom commands and of course the ability to accept values from autocad users. In autolisp, to accept a value from a user takes only a single line of code while in ObjectArx, it takes two to three. When we talk about power and simplicity, AutoLisp is the winner. It is also as simple as VBscript however it is as powerful as ObjectArx. However when it comes to real power and total control over autocad, then the trophy goes to ObjectArx. ObjectArx is so powerfull that you can almost do anything you can imagine for a CAD system with it. As a matter of fact, when you open the program files folder of Autocad, you'll see a lot autocad components that have an icon of Arx which means that they are written using the ObjectArx application programming interface. ObjectArx can only be programmed using C++ - this is the
language of the real geeks in the computer science. Because the ObjectArx topic is so broad, you can't even find its documentation in Autocad help files unlike Autolisp and VBscript. You have to visit the website of Autodesk to learn more about it. Learning ObjectArx at the beginning. But when you already have a good grasp of it, you'll be very happy and you'll feel a complete control over your this most popular CAD system.




Determine the Length of An Arc in Autocad


Deterimining the length of an arc in Autocad is one of the poblems that draftsmen encouter. This problem is actually quite easy and in fact it can be solved in two ways.

Solution A.
1. Select the arc on the screen.
2. Go to Modify Menu and Click Properties.
3. The Properties window will appear.
4. In that window, look for the parameter Arc length
5. That value is the length of the arc in autocad
Solution B.
1. Type in the command PEDIT in the command line.
2. Enter Y.
3. The polylines options will appear. Just enter X.
4. Type in AREA and press ENTER.
5. ENTER O (optin for object).
6. Select the arc on the screen.
7. The command line should now display the length of the arc selected.


How to Use Autolisp at the Command Line to Remember the Selected Drawing Objects And Points


If are an ordinary autocad used user, chances are you are not familiar with Autolisp to automate autocad. I know you are probably a bit scared when someone talks about automation or programming. But hey give yourself a favor. I can tell that it's very easy and once you figure out what it does and how it helps you, I bet you'll keep asking for more.

Have you ever used the GROUP command in autocad to remember the objects you selected? There's actually a short line Autolisp code that can do this. This autolisp code does not only remember the selection of objects you selected but you can also refer back to the selection using a variable. In the command line, type in (setq h (ssget)) and then press enter. The letter h in the autolisp code above is the letter that refer to the selected objetcs. After you hit enter, autocad will prompt you to select the objects. So just select the drawing objects you want to remember and then press enter. Those selected objects are now in the autocad memory and when you need to select these objects automatically during the drawing session, this happens when you see the prompt Select Objects, just type in !h in the command prompt and press enter. The objects you selected will automatically highlight. Now, if you want to remember a point in autocad just type in this autolisp code (setq p (getpoint)) in the command line and press enter, then pick a point. If you want to recall the selected point, just type in !p. This is useful when you draw lines or circles. Type in the corresponding commands and when prompted to Select a point, simply type in !p and your line will drawn from that point or your circle will be centered on that point.


How to Copy an Entire Layer in Autocad


Copying an Entire Layer in Autocad is one of the important tricks every autocad draftsman should know. To do that, follow the following steps.

1. First make sure that the autocad layer you want to copy is visible, thawed and unlocked.
2. Enter the command QSELECT.
3. After you enter the command above, a dialog box will appear. (Entire drawing, Multiple, Layer, Equals)
4. In the dropwown menu 'Value', select the layer you want to copy
5. Click on "Include in new selection set" radio button.
6. Uncheck 'Append to current selection set' then click OK.
7. At this point, you should have selected everything on the layer.
8. Enter command -COPYTOLAYER .
9. Type in the name of the new layer name that you want, and press Enter.

10. At the prompt 'The layer [your layer name] does not exist. Do you want to create it? Y/N', enter Y.

11. At the prompt 'Specify base point or.', just press ENTER.
12. That's all there is to it to copy an entire autocad layer


How to draw bold lines in Autocad or How to make an existing line object bold


Actually, there are several ways to draw bold lines in autocad . These are the following:
A. The simplest way to draw a bold line in autocad is by doing the following steps:
1. Type in 'L' or 'line' and define your line by specifying the starting and end points.
2. Select the line you've just created. The selected line should highlight.
3. Finally, use the line lineweight toolbar and assign the line weight.

B. Use pline to draw lines in autocad :
1. You can use a pline to draw a line. You can also make an ordinary line a pline by using the PEDIT command. Once you are sure that it already a pline, assign it a width value.
2. This should create a bold line in autocad. This is not a lineweight but basically the same idea.
C. Move the line object onto the a layer:
1. You can also move the line into a layer.
2. Assign a lineweight to that layer. However, make sure that the lineweight of that entity is set to 'bylayer'.
C. Move the line into a layer and assign that layer a color:
1. In this method, you have to move the line entity into a layer and assign that 'layer a color that corresponds a pen color setting in your color table to print thicker than others.


How to Solid Hatch or Solid Fill a Drawing Region/Polygon In Autocad


Solid hatching or filling a region, polygon or closed figure in Autocad is very useful in making document titles or bold figures and regions in drawing documents. Before, I used to use the Hatch command in Autocad which I found a very long and tedious solution for this problem. When using the Hatch command you have to selec a hatch pattern to fill the a region and set the scale to a very small amount

to just to have a solid-looking fill of a polygon or region. After some search, I have found a command that solves this problem. This command is BHATCH . Just type in Bhatch command in your Autocad command prompt, select the region, closed figures or polygon you want to hatch and press enter. And voila! Your polygon is now hatched or filled with a solid fill.


Hide a block or part of a block in our Autocad drawing


There are times when we need to hide a block or part of a block in our Autocad drawing. We badly need to do this when we need to hide a part or portion of block into view. This can be done by using the autocad command XCLIP.

Type in xclip in command prompt, select the block and follow the instructions in the command prompt. For more information on how to use the xclip command see the Autocad reference for XCLIP command in the help section. After mastering the trick on hiding part or portion of blocks in Autocad, you'll find that has more use that you expected.