[OpendTect_Developers] Use of CmdDriver in OD development work

Jaap Glas Jaap.Glas at dgbes.com
Mon Apr 18 12:13:47 CEST 2011


Dear fellow developers,

Did you know that OpendTect's CmdDriver plugin can also be
applied in your daily development work on OpendTect? Did you
ever counted how many times you restart OpendTect and repeat
the same sequence of initial actions to end up in the situation
where you can start debugging or see the effect of your latest
code change? One can save a lot of mouse clicks by recording this
action sequence the first time, and have it replayed automatically
from then on.

Let's suppose you have recorded your sequence of initial actions
in /fullpath/initact.odcmd. One option is to copy this file as
autoexec.odcmd to the settings directory, which is the .od/ directory
of your personal home directory, unless the DTECT_SETTINGS or
DTECT_WINSETTINGS environment variable specifies otherwise.
Another option is to copy it as autoexec.odcmd to the Proc/
directory of the survey you are using to test your code.

If you are working on Linux, the recorded file can also be run
directly from the command line:

start_dtect cmd=/fullpath/initact.odcmd

And when you are running the debugger:

gdb ./od_main
r cmd=/fullpath/initact.odcmd

In order to temporarily skip running an autoexec-file without
removing it, one can use cmd=noautoexec, cmd=nosettingsautoexec or
cmd=nosurveyautoexec. More info (also for Windows) can be found in
the "Executing scripts from the command line" section of Appendix B
of OpendTect's user manual.

Restoring a saved session might be an alternative way to save yourself
some clicks at start-up, but lots of time it does not yet cover the
newest features you are working on as a developer.


Best regards,


Jaap Glas

-- 
-- dr. Jaap C. Glas
-- Software Engineer
-- dGB Earth Sciences
-- Nijverheidstraat 11-2
-- 7511 JM Enschede, The Netherlands
-- jaap.glas at dgbes.com
-- http://www.dgbes.com
-- Tel: +31 534315155, Fax: +31 534315104





More information about the Developers mailing list