Exporting Figure at every time step?

Hello,

I would like to export the frames that “recorded (in the memory)” at
each time step (of either kinematics or Dynamics Analysis) as .jpeg or
any other format so that I grab these figures and display them using
program like MATLAB at each time step – so that a iterative process
is shown.

Is there any way I can do that? since the “record” feature can export
to .jpeg format after the “stop” button is pressed. A script that do
the following do what I wanted?

set previoustimestep=0;
timestep =1;
command to start the record process to grab 1 frame;
command to stop the record and export to some file name and format;

if(timestep not equal previoustimestep)
external program go grab the figure and display it;

timestep=timestep+1;

Or there is esier way to get around with this? Any comments or tricks
are welcome!


Or, is there a Anyscript command that issue the record frame action
and export figure action using the DOS command line (-Since I can
issure DOS command from within the MATLAB)? In this case, the frames
will only available after the simulation process is done.

Thanks,
Leng-Feng

Hello Leng-Feng,

There is no need to write AnyScript code to dump images. Just follow
the instructions in the interface tutorial here:
http://www.anybodytech.com/71.0.html

Best regards,
John

— In anyscript@yahoogroups.com, “Leng-Feng Lee” <lengfenglee@…>
wrote:
>
> Hello,
>
> I would like to export the frames that “recorded (in the memory)”
at
> each time step (of either kinematics or Dynamics Analysis)
as .jpeg or
> any other format so that I grab these figures and display them
using
> program like MATLAB at each time step – so that a iterative
process
> is shown.
>
> Is there any way I can do that? since the “record” feature can
export
> to .jpeg format after the “stop” button is pressed. A script that
do
> the following do what I wanted?
>
> set previoustimestep=0;
> timestep =1;
> command to start the record process to grab 1 frame;
> command to stop the record and export to some file name and format;
>
> if(timestep not equal previoustimestep)
> external program go grab the figure and display it;
>
> timestep=timestep+1;
>
> Or there is esier way to get around with this? Any comments or
tricks
> are welcome!
>
> ------------------------------------------------
> Or, is there a Anyscript command that issue the record frame action
> and export figure action using the DOS command line (-Since I can
> issure DOS command from within the MATLAB)? In this case, the
frames
> will only available after the simulation process is done.
> -----------------------------------------------
>
> Thanks,
> Leng-Feng
>

Hello John,

Thanks for your reply.
But that is not what I intended to do. I actually want to run the
AnyBody via MATLAB. (this is done using the command line of Anybody,
the AnyBody Software window is not loaded).

Is it possible to grab the frames, then I can display them via
matlab?

Thanks,
Leng-Feng

— AnyBody Support <support@anybodytech.com> wrote:

> Hello Leng-Feng,
>
> There is no need to write AnyScript code to dump images. Just
> follow
> the instructions in the interface tutorial here:
> http://www.anybodytech.com/71.0.html
>
> Best regards,
> John
>
> — In anyscript@yahoogroups.com, “Leng-Feng Lee” <lengfenglee@…>
>
> wrote:
> >
> > Hello,
> >
> > I would like to export the frames that “recorded (in the memory)”
>
> at
> > each time step (of either kinematics or Dynamics Analysis)
> as .jpeg or
> > any other format so that I grab these figures and display them
> using
> > program like MATLAB at each time step – so that a iterative
> process
> > is shown.
> >
> > Is there any way I can do that? since the “record” feature can
> export
> > to .jpeg format after the “stop” button is pressed. A script that
>
> do
> > the following do what I wanted?
> >
> > set previoustimestep=0;
> > timestep =1;
> > command to start the record process to grab 1 frame;
> > command to stop the record and export to some file name and
> format;
> >
> > if(timestep not equal previoustimestep)
> > external program go grab the figure and display it;
> >
> > timestep=timestep+1;
> >
> > Or there is esier way to get around with this? Any comments or
> tricks
> > are welcome!
> >
> > ------------------------------------------------
> > Or, is there a Anyscript command that issue the record frame
> action
> > and export figure action using the DOS command line (-Since I can
> > issure DOS command from within the MATLAB)? In this case, the
> frames
> > will only available after the simulation process is done.
> > -----------------------------------------------
> >
> > Thanks,
> > Leng-Feng
> >
>
>
>
>
>


Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Hi Leng-Feng

It is not possible to get the frames using the console application,
since the modelview is not a part of the console application.

Did you try to run the model again using the normal frame recorder
like John suggested? and did this still produce zero activities, if
this is the case please zip the model and i will try to resolve the
problem.

Best regards
Søren, AnyBody Support

— In anyscript@yahoogroups.com, Leng-Feng Lee <lengfenglee@…>
wrote:
>
> Hello John,
>
> Thanks for your reply.
> But that is not what I intended to do. I actually want to run the
> AnyBody via MATLAB. (this is done using the command line of
Anybody,
> the AnyBody Software window is not loaded).
>
> Is it possible to grab the frames, then I can display them via
> matlab?
>
> Thanks,
> Leng-Feng
>
> — AnyBody Support <support@…> wrote:
>
> > Hello Leng-Feng,
> >
> > There is no need to write AnyScript code to dump images. Just
> > follow
> > the instructions in the interface tutorial here:
> > http://www.anybodytech.com/71.0.html
> >
> > Best regards,
> > John
> >
> > — In anyscript@yahoogroups.com, “Leng-Feng Lee” <lengfenglee@>
> >
> > wrote:
> > >
> > > Hello,
> > >
> > > I would like to export the frames that “recorded (in the
memory)”
> >
> > at
> > > each time step (of either kinematics or Dynamics Analysis)
> > as .jpeg or
> > > any other format so that I grab these figures and display them
> > using
> > > program like MATLAB at each time step – so that a iterative
> > process
> > > is shown.
> > >
> > > Is there any way I can do that? since the “record” feature can
> > export
> > > to .jpeg format after the “stop” button is pressed. A script
that
> >
> > do
> > > the following do what I wanted?
> > >
> > > set previoustimestep=0;
> > > timestep =1;
> > > command to start the record process to grab 1 frame;
> > > command to stop the record and export to some file name and
> > format;
> > >
> > > if(timestep not equal previoustimestep)
> > > external program go grab the figure and display it;
> > >
> > > timestep=timestep+1;
> > >
> > > Or there is esier way to get around with this? Any comments or
> > tricks
> > > are welcome!
> > >
> > > ------------------------------------------------
> > > Or, is there a Anyscript command that issue the record frame
> > action
> > > and export figure action using the DOS command line (-Since I
can
> > > issure DOS command from within the MATLAB)? In this case, the
> > frames
> > > will only available after the simulation process is done.
> > > -----------------------------------------------
> > >
> > > Thanks,
> > > Leng-Feng
> > >
> >
> >
> >
> >
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>

Hello Søren,

The model is running fine now. Thanks for your help.

The frame recorder works fine, I was intended to use the graphic
capability of AnyBody to get the frame of each time steps and display
it in a MATLAB GUI (since I have a optimization process run from
MATLAB using Anybody as the computation mechine for the muscle
force).

Is there a way to issue “record frame” command from the console
application? It sound not possible but maybe you have better idea?

Thanks,
Leng-Feng

— AnyBody Support <support@anybodytech.com> wrote:

> Hi Leng-Feng
>
> It is not possible to get the frames using the console application,
>
> since the modelview is not a part of the console application.
>
> Did you try to run the model again using the normal frame recorder
> like John suggested? and did this still produce zero activities, if
>
> this is the case please zip the model and i will try to resolve the
>
> problem.
>
> Best regards
> Søren, AnyBody Support
>
> — In anyscript@yahoogroups.com, Leng-Feng Lee <lengfenglee@…>
> wrote:
> >
> > Hello John,
> >
> > Thanks for your reply.
> > But that is not what I intended to do. I actually want to run the
> > AnyBody via MATLAB. (this is done using the command line of
> Anybody,
> > the AnyBody Software window is not loaded).
> >
> > Is it possible to grab the frames, then I can display them via
> > matlab?
> >
> > Thanks,
> > Leng-Feng
> >
> > — AnyBody Support <support@…> wrote:
> >
> > > Hello Leng-Feng,
> > >
> > > There is no need to write AnyScript code to dump images. Just
> > > follow
> > > the instructions in the interface tutorial here:
> > > http://www.anybodytech.com/71.0.html
> > >
> > > Best regards,
> > > John
> > >
> > > — In anyscript@yahoogroups.com, “Leng-Feng Lee”
> <lengfenglee@>
> > >
> > > wrote:
> > > >
> > > > Hello,
> > > >
> > > > I would like to export the frames that “recorded (in the
> memory)”
> > >
> > > at
> > > > each time step (of either kinematics or Dynamics Analysis)
> > > as .jpeg or
> > > > any other format so that I grab these figures and display
> them
> > > using
> > > > program like MATLAB at each time step – so that a iterative
> > > process
> > > > is shown.
> > > >
> > > > Is there any way I can do that? since the “record” feature
> can
> > > export
> > > > to .jpeg format after the “stop” button is pressed. A script
> that
> > >
> > > do
> > > > the following do what I wanted?
> > > >
> > > > set previoustimestep=0;
> > > > timestep =1;
> > > > command to start the record process to grab 1 frame;
> > > > command to stop the record and export to some file name and
> > > format;
> > > >
> > > > if(timestep not equal previoustimestep)
> > > > external program go grab the figure and display it;
> > > >
> > > > timestep=timestep+1;
> > > >
> > > > Or there is esier way to get around with this? Any comments
> or
> > > tricks
> > > > are welcome!
> > > >
> > > > ------------------------------------------------
> > > > Or, is there a Anyscript command that issue the record frame
> > > action
> > > > and export figure action using the DOS command line (-Since I
>
> can
> > > > issure DOS command from within the MATLAB)? In this case, the
>
> > > frames
> > > > will only available after the simulation process is done.
> > > > -----------------------------------------------
> > > >
> > > > Thanks,
> > > > Leng-Feng
> > > >
> > >
> > >
> > >
> > >
> > >
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam? Yahoo! Mail has the best spam protection around
> > http://mail.yahoo.com
> >
>
>
>
>
>
>


Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Hi Leng-Feng

There is no way today that the console application can export frames
while it is running, so that they can be used in another GUI. We
have this facility on our list for future developments, but i can
not promise you when it will be available. If you have more ideas on
how this should work, please let us know, we are always intersted in
feedback from our users.

By the way, the new version 2.0 which will be availble within weeks
now has build in optimization, so it is possible to have a extra
user defined optimization loop like you describe, maybee this can
solve your problem.

Best regards
Søren, AnyBody Support

— In anyscript@yahoogroups.com, Leng-Feng Lee <lengfenglee@…>
wrote:
>
> Hello Søren,
>
> The model is running fine now. Thanks for your help.
>
> The frame recorder works fine, I was intended to use the graphic
> capability of AnyBody to get the frame of each time steps and
display
> it in a MATLAB GUI (since I have a optimization process run from
> MATLAB using Anybody as the computation mechine for the muscle
> force).
>
> Is there a way to issue “record frame” command from the console
> application? It sound not possible but maybe you have better idea?
>
> Thanks,
> Leng-Feng
>
> — AnyBody Support <support@…> wrote:
>
> > Hi Leng-Feng
> >
> > It is not possible to get the frames using the console
application,
> >
> > since the modelview is not a part of the console application.
> >
> > Did you try to run the model again using the normal frame
recorder
> > like John suggested? and did this still produce zero activities,
if
> >
> > this is the case please zip the model and i will try to resolve
the
> >
> > problem.
> >
> > Best regards
> > Søren, AnyBody Support
> >
> > — In anyscript@yahoogroups.com, Leng-Feng Lee <lengfenglee@>
> > wrote:
> > >
> > > Hello John,
> > >
> > > Thanks for your reply.
> > > But that is not what I intended to do. I actually want to run
the
> > > AnyBody via MATLAB. (this is done using the command line of
> > Anybody,
> > > the AnyBody Software window is not loaded).
> > >
> > > Is it possible to grab the frames, then I can display them via
> > > matlab?
> > >
> > > Thanks,
> > > Leng-Feng
> > >
> > > — AnyBody Support <support@> wrote:
> > >
> > > > Hello Leng-Feng,
> > > >
> > > > There is no need to write AnyScript code to dump images. Just
> > > > follow
> > > > the instructions in the interface tutorial here:
> > > > http://www.anybodytech.com/71.0.html
> > > >
> > > > Best regards,
> > > > John
> > > >
> > > > — In anyscript@yahoogroups.com, “Leng-Feng Lee”
> > <lengfenglee@>
> > > >
> > > > wrote:
> > > > >
> > > > > Hello,
> > > > >
> > > > > I would like to export the frames that “recorded (in the
> > memory)”
> > > >
> > > > at
> > > > > each time step (of either kinematics or Dynamics Analysis)
> > > > as .jpeg or
> > > > > any other format so that I grab these figures and display
> > them
> > > > using
> > > > > program like MATLAB at each time step – so that a
iterative
> > > > process
> > > > > is shown.
> > > > >
> > > > > Is there any way I can do that? since the “record” feature
> > can
> > > > export
> > > > > to .jpeg format after the “stop” button is pressed. A
script
> > that
> > > >
> > > > do
> > > > > the following do what I wanted?
> > > > >
> > > > > set previoustimestep=0;
> > > > > timestep =1;
> > > > > command to start the record process to grab 1 frame;
> > > > > command to stop the record and export to some file name and
> > > > format;
> > > > >
> > > > > if(timestep not equal previoustimestep)
> > > > > external program go grab the figure and display it;
> > > > >
> > > > > timestep=timestep+1;
> > > > >
> > > > > Or there is esier way to get around with this? Any comments
> > or
> > > > tricks
> > > > > are welcome!
> > > > >
> > > > > ------------------------------------------------
> > > > > Or, is there a Anyscript command that issue the record
frame
> > > > action
> > > > > and export figure action using the DOS command line (-
Since I
> >
> > can
> > > > > issure DOS command from within the MATLAB)? In this case,
the
> >
> > > > frames
> > > > > will only available after the simulation process is done.
> > > > > -----------------------------------------------
> > > > >
> > > > > Thanks,
> > > > > Leng-Feng
> > > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > > __________________________________________________
> > > Do You Yahoo!?
> > > Tired of spam? Yahoo! Mail has the best spam protection
around
> > > http://mail.yahoo.com
> > >
> >
> >
> >
> >
> >
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>