cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

Define Animations with Lisp-Files

ThomasS2
10-Marble

Define Animations with Lisp-Files

Hello,

I am trying to define animations automatically with Lisp-Files. The dialogs to define animations are part of the "Advanced Assembly Module". I'd like to rotate and translate objects or assemblies based on their coordinate systems inside the dialog "anim_create_animations".

structure.JPG

 

 

Description:

In the attachments is a Lisp-File, which works quite well, but there are a few restrictions. First we define the assembly (B1), object (T1) and coordinate system (CoSy1). Then the dialog "anim_create_animation" is called with "sd-call-cmds" and an animation is created. After that, the object is translated in the direction of the global x-axis (1,0,0) and the position is captured with ":dyn_pos_capture". Afterwards, the object is rotated around an axis defined by "direction3d" and "position3d". Again a global direction is used, z-axis (0,0,1) and the position (0,0,0). After the rotation, a picture is taken and the animation is finished.

 

Now to the problems:

  • Instead of the global x-axis (hard-coded), I'd like to inquire the global x-axis of CoSy1. Normally I would do it like this:  "(oli:sd-inq-coord-sys-elem-value CoSy1 :x-axis t :dest-space :global)", but it seems like the values of CoSy1 are not updated during "anim_create_animations", I only get the initial values. Is there a way to inquire current values of coordinate systems during "anim_create_animations"?
  • Another problem is the long generation time to create animations with a lot of positions. Is it possible to enhance or speed up this process?

 

My research:

  • If I call "anim_create_animations" without "sd-call-cmds" and without parentheses, like a recorder file, it works. Unfortunately, after a certain amount of captured positions, the user-interface crashes.
  • To speed up the process "freeze_vp" before and "unfreeze_vp" after "anim_create_animations" works a bit. Moreover, pc performance plays a big role as well. 
0 REPLIES 0
Top Tags