How to create ggt file

cilantro05 shared this question 3 years ago
Answered

I can not figure out how to create a ggt file with a custom tool. Whenever I attempt to save my custom tool from the Manage Tools menu, I get a message telling me that the tool was saved successfully. But where?? There is no trace of a new file, nor was I prompted for a filename.

I get the same behavior whether I run GeoGebra locally or online with a browser, and whether or not I am signed in. Ideally, I would like to save a local copy, without using the cloud. I am running GeoGebra Classic under Ubuntu 18.04. I will try another machine, using a different OS, but I have no trouble saving ggb files (locally), so I doubt that's the problem.

Could someone please post (or point me to) complete directions for how to create ggt files? I can find lots of information about how to load such files, but no explicit instructions for how to create them beyond "use the Manage Tools menu", which is clearly not working. (I've also tried the "share" button in that menu, but can't make heads or tails of the result, which appears to open a completely new shared resource in the cloud.)

Is there some way to extract the ggt information from a saved ggb file?? If there's no quick resolution to this problem, that might be a better option.

Thanks,

Cilantro

Comments (3)

photo
1

I am able to save the tool, but not able to save it as a GGT file. I see that it looks like it's been saved as a tool file:

/fO3ZWmQHms8AAAAASUVORK5CYII=

Then when I go to download it, I get the following message:

/r98AAAAAElFTkSuQmCC

photo
1

Turns out that if you download GeoGebra Version 5 you can create a custom tool and save it as a ggt file just as expected. How that didn't stay the same in Version 6 is beyond me. The tool also works just fine V6 files. I'd say the best work around at the moment is to download V5, create the tool that you want, and then bring it to your V6 file.

photo
1

Returning to this question after some time, I can report that nothing has changed but there is a reasonably straightforward workaround: Manually merge the XML code. It's not that difficult:

  • GGB files are just ZIP archives;
  • Macros are contained in the file geogebra_macro.xml;
  • Each macro is surrounded by <macro></macro> tags.

So after creating one or more macros, simply save your work as a GGB file, then unzip the file to extract the XML file. To insert these macros into another GGB file, unzip it into an empty folder, and either copy the first geogebra_macro.xml file into this folder (if the file doesn't already exist) or merge it with the one that's already there (by copying everything between the first <macro> and last </macro>). Zip up this folder (and give it a GGB extension), and you're done.

(Custom icons live in subfolders, which can also be copied -- or, presumably, recreated afterward using the Manage Tools menu, although I haven't tried that.)

© 2023 International GeoGebra Institute