Tips & Tricks

How to animate a spring – Part 2

How to animate a spring – Part 2

10 June, 2009

6 Comments
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!

You may also like

Tags:

6 Comments »

  • a2114850 says:

    I’ve said that least 2114850 times. SCK was here

  • Great goods from you, man. I’ve remember your stuff previous to and you’re simply too great. I really like what you have received right here, certainly like what you’re saying and the way in which in which you are saying it. You’re making it enjoyable and you still take care of to keep it sensible. I cant wait to learn far more from you. That is actually a great website.

  • Woah! I’m really loving the template/theme of this site. It’s simple, yet effective. A lot of times it’s tough to get that “perfect balance” between usability and appearance. I must say you have done a excellent job with this. Also, the blog loads extremely quick for me on Internet explorer. Excellent Blog!

  • I’ve noticed that credit restoration activity needs to be conducted with techniques. If not, you might find yourself causing harm to your rank. In order to be successful in fixing your credit history you have to make sure that from this moment in time you pay any monthly dues promptly prior to their appointed date. It is significant because by not accomplishing this, all other steps that you will decide to use to improve your credit ranking will not be powerful. Thanks for giving your tips.

  • tory burch says:

    five Energy Tips To Double Your Sales

  • In my opinion that a property foreclosures can have a significant effect on the client’s life. House foreclosures can have a Several to a decade negative relation to a debtor’s credit report. A borrower who have applied for a home loan or any kind of loans as an example, knows that the worse credit rating will be, the more tough it is to obtain a decent financial loan. In addition, it might affect any borrower’s capability to find a good place to let or hire, if that will become the alternative homes solution. Thanks for your blog post.

You must be logged in to post a comment.