Please enable JavaScript to view this site.

GeoDict User Guide 2025

Navigation: » No topics above this level «

Scroll

GeoPy Scripting

GeoDict offers the key possibility of recording and executing macros or scripts directly from the GUI (Graphical User Interface) or in the command line.

A scripting language is a programming language that automates the execution of tasks which could alternatively be executed one-by-one by a human operator. For this, GeoDict uses Python.

How to get started with automation of your workflows

Advantages of automation

In GeoDict, variables and their operations which are defined in a simple Python macro, can be modified using text editor capabilities. The advantages of using macros with variables and other GeoDict macros are:

  • Automation of sequences of operations that can run:
    • Without intermediate user interaction.
    • With automatic parameter variation.
  • Avoidance of the error-prone and time-consuming process of sequentially introducing values and clicking the same buttons during frequently repeated processes.
  • Documentation of input parameters providing a record of your activity that can be reproduced by you and by others. All generation parameters are recorded in the macro and might be modified at any time.
  • Option of delaying the execution of the operations listed during the macro recording. Using Record Only the macro can be recorded first without actually executing the commands. For example, you record several filtration simulations to run them during the weekend or when cluster time is available. Perhaps you prefer to work on a local computer, but the simulation computations must be done on a remote, more powerful computer.
  • Possibility of modifying an isolated parameter in a recorded macro. You can edit the macro with any available text editor (Emacs, WinEdit, WordPad, Notepad, etc.). The modified macro can then be executed.
  • Execution of the macro without the intervening GUI, simply as a command line tool. For example, when you need to run GeoDict in a batch queue on a Linux cluster or want to control GeoDict by an outside optimization algorithm.
  • Variables may take a single value, or multiple values, conveniently defined as a parameters study (via a text editor) or in the GeoDict GUI.
  • Macros with variables can reduce the many input parameters for the various commands in macros to just a few important ones.
  • The relationship between input parameters may be implemented through arithmetic operations. For example, you chooses the value for the short cross-section diameter of an ellipsoid fiber, and the long one is automatically entered to be 3 times as big.
  • Macros with variables can be used to “program” GeoDict. For example, when a whole sequence of operations from GrainGeo, ProcessGeo, or LayerGeo is needed to create a realistic geometric model, yet the resolution, porosity, and grain size can vary. Such behavior is seen in the predefined models, e.g. for the GrainGeo module included in the installation folder. In another example, movies may need to be made always with the same corporate color scheme and from the same perspective, on structures of your choice.
  • Macros can also be recorded by running GeoDict macros, including parameter studies, to create your own new "effective commands" for GeoDict.

Note-Important

Important! GeoDict 2025 does not effectively support macro syntax older than GeoDict 2020. Errors may occur, when running macros with older syntax or loading parameter settings from them.

©2025 created by Math2Market GmbH / Imprint / Privacy Policy