Programming examples

Scripts and commands described here are in the GitHub repository ComandosDigi3DPython.

Run them in two ways:

  • As commands: enter the file name without .py on the command line. Commands with parameters use NOMBRE=parámetro1 parámetro2 .... Digi3D.AI installs them in OrdenesPython under its installation folder. To modify one, copy its .py to your macro directory and edit that copy, which takes precedence. Python commands from ComandosDigi3DPython lists search folders and summarizes each command.
  • Paste or open a script in the Python script pane. This method supports only scripts without parameters.

Each page shows complete code and explains it step by step. Each group progresses from easier to harder examples.

Missing parameters or invalid numbers cause the command to play the error sound and display the reason and usage.

Scripts without parameters

Commands with parameters

Interactive commands

Digi3D.AI's embedded interpreter provides only the standard library, without third-party packages such as numpy or requests. Web service examples use urllib.request, which belongs to the standard library.

See also