%Installer
Hi ,
We are trying to import file using %installer . But we are getting error.
CODE:
Include %occInclude Class User.InsClass { // You can see generated method in zsetup+1^App.Installer.1 XData Install [ XMLNamespace = INSTALLER ] {
ERROR :
%SYS>Do ##class(User.InsClass).setup(.pVars)
2017-04-26 17:43:56 0 User.InsClass: Installation starting at 2017-04-26 17:43:56, LogLevel=0
2017-04-26 17:43:56 0 : SourceDir defined - offline install from C:\temp\distr\
Load started on 04/26/2017 17:43:56
ERROR #5012: File 'C:\temp\distr\text' does not exist
Detected 1 errors during load.
2017-04-26 17:43:56 0 User.InsClass: ERROR #5012: File 'C:\temp\distr\text' does not exist
2017-04-26 17:43:56 0 User.InsClass: Installation failed at 2017-04-26 17:43:56
2017-04-26 17:43:56 0 %Installer: Elapsed time .027753s
Could anyone help us and let us know how to import and export file using %installer .
Comments
Could you please edit your question and put correct source code.
Did you see my answer above? Did you look at using the ExportAllClasses method of %SYSTEM.OBJ to write a file? And then use the Import method from within another namespace to load the contents of that file?
To help you get started, here's me running the first step:
SAMPLES>s sc=$system.OBJ.ExportAllClasses("c:\s\samples-allclasses.xml")
Exporting class: Aviation.Aircraft
Exporting class: Aviation.Classification.Utils
Exporting class: Aviation.Crew
...
Also, you may find the "Add new comment" links in Developer Community useful, instead of posting answers that are really questions. For example:

Please also be aware that you can mark one answer to your question as "accepted" by clicking on that checkmark you see in my screenshot above.
We are able to import the file using the query. But we are unable to export the class file.
Is there any script to export the class files of a namespace to a particular location ??
Regards,
Arpitha
Look at the methods of %SYSTEM.OBJ and in particular ExportAllClasses.
Hi ,
I would like to know if there is any program to export multiple class files from studio's one namespace to another without specifying classname. As in case of Import where we just specify the import tag as given below.
<Namespace Name="${Namespace}" Create="no">
<CSPApplication Url="/csp/${Namespace}" Directory="${CSPDIR}${Namespace}" AuthenticationMethods="64" IsNamespaceDefault="true" Grant="AppRole" />
<IfDef Var="SourceDir">
<Log Text="SourceDir defined - offline install from ${SourceDir}" Level="0"/>
<Import File="${SourceDir}"/>
</IfDef>
</Namespace>
Regards,
Arpitha R