Written by

Senior Developer at mediworx software solutions, a.s.
Question Adam Skurek · 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.

Comments

John Murray · Apr 13, 2017

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.
 
SAMPLES>

0
Adam Skurek  Apr 13, 2017 to John Murray

Thank you, it seems to work.

$SYSTEM.OBJ.Export("WRC.Text.cls","C:\export.xml","/recursive=1")

0
Dmitry Maslennikov  Jun 18, 2017 to Coty Embry

Next time please, ask in a separate question, for now, I've done it for you.

0
Coty Embry · Jun 18, 2017

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")

0