It's useless on your local dev, but depending your goal : You can try to dump
zzDumpDoc(pkg, targetDir="c:\dev\testdumpdoc\")
new (pkg, targetDir)
Do:'##class(%File).DirectoryExists(targetDir) ##class(%File).CreateDirectoryChain(targetDir)
Set pkgDot = pkg _ ".", class = pkgDot, restore = 0
If $Isobject($Get(%request)) {
Set oldRequest = %request
Set oldResponse = %response
Set oldSession = %session
Set restore = 1
}
Set %request = ##class(%CSP.Request).%New()
Set %response = ##class(%CSP.Response).%New()
Set %session = ##class(%CSP.Session).%New("0123456789")
Do %session.Unlock()
Set %request.Data("PAGE",1) = "CLASS"
For {
Set class = $Order(^oddDEF(class))
Quit:$e(class,1,$l(pkgDot))'=pkgDot
Set %request.Data("LIBRARY",1) = $namespace
Set %request.Data("CLASSNAME",1) = class
Set initialIO = $IO
Set file = targetDir_class_".html"
OPEN file:("NRW"):2
USE file
Do ##class(%CSP.Documatic.PrintClass).OnPage()
USE initialIO
CLOSE file
}
If restore {
Set %request = oldRequest
Set %response = oldResponse
Set %session = oldSession
}
quit
There exits more elegant way to redirect the output (check the community).
- Log in to post comments