· Apr 13, 2017

Export Cache Class including dependent classes

In Cache Studio there is export class dialog with options "Export current project" and "Include dependent classes".

Is there any way to export class programmatically, but with same effect as if "Include dependent classes" was checked? So that not only the class itself is exported, but also all dependent classes? I know of Export method in %SYSTEM.Obj class, but it only exports the class itself.

Discussion (4)1
Log in or sign up to continue

Maybe adding the /recursive=1 qualifier will give you what you want. If so, please click the checkmark to accept this answer.

SAMPLES>d $system.OBJ.Export("Cinema.Film.cls","c:\s\exp1.xml")                  
Exporting to XML started on 04/13/2017 09:49:36
Exporting class: Cinema.Film
Export finished successfully.
SAMPLES>d $system.OBJ.Export("Cinema.Film.cls","c:\s\exp2.xml","/recursive=1")   
Exporting to XML started on 04/13/2017 09:49:39
Exporting class: Cinema.Duration
Exporting class: Cinema.Film
Exporting class: Cinema.FilmCategory
Export finished successfully.

How would I export the WHOLE PROJECT rather than just a single class file out to an XML file?

I would like to, on every file change export the whole project to XML

Thanks for your time

# Edit 1:

 I figured out how to export the "whole project" or in my case all of the classes in Studio, by doing the following:

    S EXPORT=$SYSTEM.OBJ.ExportAllClasses("C:\YourPathHere\MyWholeProject.xml")