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.

Vote up!
Vote down!

Rating: 0

Comments: 3 Views: 101

Comments

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

Vote up!
Vote down!

Rating: 0

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

Vote up!
Vote down!

Rating: 2

1 answer

Answer

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>

Vote up!
Vote down!

Rating: 0

Thank you, it seems to work.

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

Vote up!
Vote down!

Rating: 1

Log in to answer