home - about - advertise     
 
 
Sponsors
Navigation
Partners

 
AutoCAD Tutorial

Animation in AutoCAD

  By Jos van Doorn
August 19, 2004

Animation in AutoCAD? - no, wait a minute - I was working in Solid Edge. Solid Edge has got a lot of animation. Not AutoCAD. So this is going to be a very short article.  Thank you very much. End of article.

Well, it's true there is no animation in AutoCAD. But we can do something about that. We can create a drawing in AutoCAD and save that drawing as a BMP file.

You know how you can save your drawing as a BMP file. Click on File on the menu bar and on Export on the pull-down menu.

The Export Data dialog box shows up. In it you can give the drawing a name and you can select a file type. Select the BMP file type.

You can create an animation of a 2D drawing. You can also create an animation of a 3D drawing. That's different. Let's go for a 2D animation.

We start with drawing an arrow using a polyline. The polyline gets a width of 2 mm. These are the points of the polyline:

10,160
50,160
50,140
70,170
50,200
50,180
10,180

Put a solid hatch in the arrow. When that's done move the whole thing 120 to the left. The arrow is no longer in the screen.

Save the screen as a BMP file. Give it the name ARROW 01. When there is asked to select objects enter ALL at the command prompt.

Now we're going to move the arrow with the hatch 20 to the right. Start the MOVE command. At the Select objects prompt you enter P.

Keep on moving the arrow and the hatch until it shows up in the screen. If it does then export it under the name ARROW02.

Keep on moving the arrow and the hatch until you are at the other end of the screen. Until the arrow and the hatch have disappeared.

You have been exporting the drawing under the name ARROW. Every time you made the index number one higher. Very good. Now we can make the animation.

To make the animation you need a program. You need the Animagic GIF Animator program. You can get it for free here: http://www.pcworld.com/downloads/file_description/0,fid,3499,00.asp. (The free version is not fully functional, but it's good enough for our purposes.)

Start the Animagic program. And load all the BMP files in the program. There is a Play button on the toolbar. Click on it.

An animation is occurring. You can save the animation. Click on File in the menu bar and on Save Anim As. You can enter a name for the file.

A GIF file is created. All the BMP files are in the GIF file. Double click the GIF file. And the animation will run in a Windows program.

Maybe you find the steps too big. No problem. The arrow was now moved over a distance of 20. Change that distance. Make it smaller.

That's nice. But it is a lot of work. All the time we must invoke the MOVE command. And then we must EXPORT the drawing to an BMP file.

There is of course a better way: we can do it faster using an AutoLISP program. You'll get the AutoLISP program soon. I'm working on it. You'll get it next time.

About the Author

Jos van Doorn is an AutoCAD specialist and AutoLISP programmer. He has published a series of e-books on AutoCAD and AutoLISP topics, which are available for downloading at his website. He is also publisher of the free ACAD Newsletter. To subscribe, visit the newsletter's webpage.

 

 
CADdigest Weekly
Email (required) *

A week's worth of articles will be emailed to you. See latest issue .