SolidWorks World 2010 Day 3: General Session
Thu, 4/02/10 – 9:56 | Comments

So here’s the quick and dirty rundown on what was covered today.
* The user group network awards were awarded
* Darren Henry and his team put on a CAD Smackdown, pitting two of our best modelers …

Read the full story »
Community

The SolidWorks Community is filled with extremely passionate engineers–you can find them all here!

Downloads

Download new versions and updates (Service Packs) for SolidWorks, Simulation, PDM, 3DVIA, and Free CAD Tools .

Events

From international conferences to local user group meetings, you’ll find a vast network of other users all around Asia Pacific.

News

What’s the latest from SolidWorks? Stay up to date and in the know with our daily news.

Tips & Tricks

Get the most out of SolidWorks with our exclusive product tips & tricks!

Home » Tips & Tricks

How to animate a spring – Part 2

Submitted by Deepak Gupta on Wednesday, 10 June 2009Comments

Here is part two of Spring Animation. To start you will the spring file you created in the last chapter i.e. How to animate a spring – Part 1.

1. Open the spring part file.
2. Click on the Record button on the macro tool bar. If you haven’t have the macro toolbar one, you can go to Tools > Macros > Record to start recording. To show the macro toolbar go to View > Toolbar > Macro.

as31

3. Double click on the spring body to show the dimensions and then click on the length, 100 mm in this case if you used the same old spring part file.

4. In the pop up window change the value to anything > I have changed it to 110 mm.

5. Click on Rebuild in the same dimension box or from the toolbar.

6. Finally click Stop on the macro toolbar or Tools > Macros > Stop.

7. Give a name your macro and hit save. I have used Spring Animate.

8. Now click on Edit button on macro toolbar or Tools > Macros > Edit

9. Browse to the macro you saved in the step 7 and open it.

10. VB editor will get open up and your screen will look like this.

11. Remove the extra line and make your window look like this.

12. Copy these 3 highlighted lines and paste them.

13. The editor window will look like this. Change the system value to .1. The system takes all in puts in meter. So if you want any other value convert it to meter and put here. .1 denotes .1 m i.e. 100mm

14. Add these 4 lines as shown and save you macro. You can keep any value for “i”. In this case I have used 10 which means the macro will run for 10 times. You can give any value or can create an input box where user can put the number of steps he needs. I will put up a macro or tutorial on how to do that.

15. Close the VB editor and back to SolidWorks window. Click on Play button on macro toolbar or Tools > Macros > Play

16. Browse to the macro you edited and saved in step 14.

17. Now sit back and enjoy the animation.

Apart from using macro, I have been trying to use Phil Sluder’s trick (SW Tips/Tricks – July Issue Adding Logic to Equations) but getting some error. I have requested Phil to check the same. As soon as he fixes as where I’m going wrong, we can have animation of spring using equations too. I’m also going to put another one using a combination of equations and Animator.

Link for the macro used in this tutorial: Spring Animate.swp

This tips has been submitted by a SolidWorks user. Any comments or feedback? Drop us a comment!

Related posts:

  1. How to animate a spring – Part 1 Quite many time people have been...
  2. How to animate simple Spur Gear in SolidWorks In this post I will discuss...
  3. How To Animate a Spring Learn how to animate a spring...
  4. How to change/swap template/system options in SolidWorks I have heard this request...
  5. DWG Editor Tips – Space Travel Space Travel – Moving entities back...

Related posts brought to you by Yet Another Related Posts Plugin.

blog comments powered by Disqus