Author Topic: Animation donīt start  (Read 12264 times)

0 Members and 1 Guest are viewing this topic.

cadplayer

  • Bull Frog
  • Posts: 390
  • Autocad Civil3d, OpenDCL.Runtime, LISP, .NET (C#)
Animation donīt start
« on: November 19, 2012, 04:00:38 AM »
I donīt understand how I build anmation-method in my function so I can see animation in my form. Can you help me: Iīv come so long

(defun c:MTools (/ cmdecho)
  (command "_OPENDCL")
  (dcl_Project_Load "h:\\MARKTEKNIK\\MTOOLS.odcl")
  (dcl_Form_Show MTOOLS_Main)
  (dcl_Animation_Load MTOOLS_Main_animation-mt "h:\\MARKTEKNIK\\MT-ANIM.avi")
  (dcl_Animation_Play MTOOLS_Main_animation-mt 0 1 2)
  (princ)
)

Animation works but not in function what is wrong, I īve seen example "Animation" and couldnīt see mistake.



Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Animation donīt start
« Reply #1 on: November 19, 2012, 04:24:11 AM »
Try something like :
Code - Auto/Visual Lisp: [Select]
  1. (command "_OPENDCL")
  2. (defun c:mtools (/)
  3.   (dcl_project_load "h:\\MARKTEKNIK\\MTOOLS.odcl")
  4.   (dcl_form_show mtools_main)
  5.   (princ)
  6. )
  7. (defun c:mtools_main_oninitialize (/)
  8.   (dcl_animation_load mtools_main_animation-mt
  9.                       "h:\\MARKTEKNIK\\MT-ANIM.avi"
  10.   )
  11.   (dcl_animation_play mtools_main_animation-mt 0 1 2)
  12. )
  13.  

and toggle the Initialize event handler ON in the ODCL
« Last Edit: November 19, 2012, 03:44:23 PM by Kerry »
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

cadplayer

  • Bull Frog
  • Posts: 390
  • Autocad Civil3d, OpenDCL.Runtime, LISP, .NET (C#)
Re: Animation donīt start
« Reply #2 on: November 19, 2012, 06:51:56 AM »
Kerry:
Two things: In your function is something wrong (parateses), than I tryed so here and it open only my form but not animation

Code: [Select]
;; Main program
(command "_OPENDCL")
(defun c:mtools (/ )
  (dcl_project_load "h:\\MARKTEKNIK\\MTOOLS.odcl")
  (dcl_form_show mtools_main)
  (princ)
)

(defun c:MTOOLS_Main_OnInitialize (/)
  (dcl_animation_load mtools_main_animation-mt "h:\\MARKTEKNIK\\MT-ANIM.avi")
  (dcl_animation_play mtools_main_animation-mt 0 1 2)
  )


Can check this?

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Animation donīt start
« Reply #3 on: November 19, 2012, 03:13:13 PM »
I checked my code before I posted it and it worked. ( with another AVI ).
Can you please post your AVI in a zip ( or a link to it.)

Which AutoCAD version ?
Which OpenDCL build ?

and can you re-post the ODCL please ?
« Last Edit: November 19, 2012, 03:47:30 PM by Kerry »
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

cadplayer

  • Bull Frog
  • Posts: 390
  • Autocad Civil3d, OpenDCL.Runtime, LISP, .NET (C#)
Re: Animation donīt start
« Reply #4 on: November 20, 2012, 06:07:23 AM »
Civil 2012 and OpenDCL.Runtime.6.0.2.5
Maybe I have to update runtime?

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Animation donīt start
« Reply #5 on: November 20, 2012, 06:44:00 AM »
Civil 2012 and OpenDCL.Runtime.6.0.2.5
Maybe I have to update runtime?

You shouldn't be running both the Runtime and  IDE editor together.
I assume you are developing on the machine you are testing on ... if so I'd uninstall both the editor and runtime and re-install the 7.0.0.9 editor.

Did you have a look at the animation sample in the samples folder ?
If so, be aware that the functions dcl_animate_xxx are deprecated and should be dcl_animation_xxx (though they should still work as written).
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

cadplayer

  • Bull Frog
  • Posts: 390
  • Autocad Civil3d, OpenDCL.Runtime, LISP, .NET (C#)
Re: Animation donīt start
« Reply #6 on: November 20, 2012, 07:12:28 AM »
Yes I have seen the sample with "animation"
I only need display avi in the form not more. Itīs a little complicate for understanding.
I have run OpenDCL Runtime [7.0.0.9] now. But I have no animation. No idea what I have to do?


cadplayer

  • Bull Frog
  • Posts: 390
  • Autocad Civil3d, OpenDCL.Runtime, LISP, .NET (C#)
Re: Animation donīt start
« Reply #7 on: November 21, 2012, 02:14:22 AM »
I find out that animation is something wrong, it will not go in ODCLruntime. But file have avi extensions. Is there anything I have to note ?

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Animation donīt start
« Reply #8 on: November 21, 2012, 03:46:18 AM »

I couldn't display your AVI.
I tried several of my own and they worked well.

Have you tried a different AVI ??
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

cadplayer

  • Bull Frog
  • Posts: 390
  • Autocad Civil3d, OpenDCL.Runtime, LISP, .NET (C#)
Re: Animation donīt start
« Reply #9 on: November 21, 2012, 06:29:09 AM »
Yes I think something is wrong with the video.. I tryed sample videos from DCL tutorial and these works well...
Can you start my video with a doubleclick ?
I donīt know support ODCL different AVI-formats ?

The video I have convert from a gif to avi video. Maybe something is wrong with charcter. I try a nother way..

cadplayer

  • Bull Frog
  • Posts: 390
  • Autocad Civil3d, OpenDCL.Runtime, LISP, .NET (C#)
Re: Animation donīt start
« Reply #10 on: November 21, 2012, 07:16:32 AM »
Anybody know, which AVI encoder I can use to be adaptable to ODCL avi format.
How do you your own video ?

owenwengerd

  • Bull Frog
  • Posts: 451
Re: Animation donīt start
« Reply #11 on: November 21, 2012, 09:17:52 AM »
The AVI must be uncompressed or compressed with 8 byte run-length encoding, and contain no audio track, according to this MSDN documentation.

cadplayer

  • Bull Frog
  • Posts: 390
  • Autocad Civil3d, OpenDCL.Runtime, LISP, .NET (C#)
Re: Animation donīt start
« Reply #12 on: November 22, 2012, 02:42:23 AM »
Hi Owen!

Do you a encoder that can create RLE aiv-format ? There is many freeware i internet. I donīt know which is good.

cadplayer

  • Bull Frog
  • Posts: 390
  • Autocad Civil3d, OpenDCL.Runtime, LISP, .NET (C#)
Re: Animation donīt start
« Reply #13 on: November 22, 2012, 01:36:24 PM »
Iīm not realy understand your link Owen :|

owenwengerd

  • Bull Frog
  • Posts: 451
Re: Animation donīt start
« Reply #14 on: November 23, 2012, 02:17:28 AM »
Sorry, I don't have anything else to add. I don't recall how I made the AVI used in the OpenDCL samples, and I have very little experience with the AVI format.