Exemplo n.º 1
0
  /**
   * @param cmd the command to evaluate
   * @return the geo elements created
   * @throws Exception if it goes wrong!
   */
  public GeoElement[] evalCommand(String cmd) throws Exception {
    // this is new in GeoGebra 4.2 and it will stop some files working
    // but causes problems if the files are opened and edited
    boolean oldVal = kernel.isUsingInternalCommandNames();
    kernel.setUseInternalCommandNames(true);

    GeoElement[] ret =
        algProcessor.processAlgebraCommandNoExceptionHandling(cmd, false, false, false);

    kernel.setUseInternalCommandNames(oldVal);

    return ret;
  }