Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Animation script causing crash/ also need advice

3 REPLIES 3
Reply
Message 1 of 4
phreaktor
577 Views, 3 Replies

Animation script causing crash/ also need advice

Hello all..  I'm very new to AC 2013 and I am teaching myself so bear with me.  I want to know if it is possible to creat a script that will rotate the cam wheel show at the pivot point, while causing the rectangle to oscillate up and down in cadence with the ppoint of the whell that is contacting it.  

 

I have a simple script that rotates the cam wheel, but every time I run it, AC crashes.  I am on Windows 7 Ultimate 64bit and I have installed the latest service pack.  Here is the script:

rotate
g
1

45.5447,44.7299
1
rscript

 

I'm not sure what other information you may need to diagnose this, so just let me know.  There is no error message given, it just freezes up.

 

3 REPLIES 3
Message 2 of 4
dmfrazier
in reply to: phreaktor

After rotating the group several times, it does the same to me (AutoCAD 2013, Win 7 32bit).

I'm guessing it has something to do with running out of memory.

 

In Help for the RSCRIPT command, there is a note:

 

Consider turning off UNDO and any log files if you anticipate running the script over a long period; otherwise, these log files continue to grow and take up increasing amounts of disk space.

Message 3 of 4
phreaktor
in reply to: dmfrazier

I actually got that script from a gear animation tut on YouTube.  Is there a way to set the iterations?  I see that the "1" indicates rotational speed.

Message 4 of 4
dmfrazier
in reply to: phreaktor


@sales wrote:

Is there a way to set the iterations?  I see that the "1" indicates rotational speed.


I don't know about iterations in a script of this type.  Definitely in AutoLISP (there is a REPEAT function that takes an integer argument).

The first "1" in the script indicates the name of a group to select; the second "1" is the rotation angle around the basepoint defined by the coordinates.  This means the rotate command is repeating 360 times for each full rotation of the objects, which helps explain why AutoCAD "seizes up" after a few rotations.  Changing that to a slightly larger number (like 2-5 degrees for each rotate command) might make the routine less intensive as long as it doesn't make it look choppy.

You could also add the DELAY command to slow things down a little.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost