We have like 5 different applications/webapps all part of this one project and so I need to grab only the files that start with MARS*.csp and not the whole project

Also I do not feel comfortable bringing other dependencies in to deal with this issue since this is dealing with our database too

I've gotten everything to work for what I needed (so thank you so much so far for your help), but one problem I'm having is getting the 'clean' .csp code exported (not the compiled .csp code that is put into a routine).

For instance I would like to export the following MARS*.csp files you see under the csp/cah folder on the screenshot and cannot do that (much like clicking Tools -> Export... -> Okay exports the files that are shown in the workspace pane) ; I'm having to export the compiled code for the .csp files for now.

Any idea on a low level command to export that particular file would be a lot of help so I can finish this puzzle.

I tried to create a class and inherit from %Studio.Project, but it wouldn't compile. Maybe because I need to somehow import that class in, but I am stuck.

I'm getting 

5927 Unable to load page '%1' because its class name conflicts with the class '%2' that is already loaded

error after a healthshare install.

I wonder if I can go into the management portal and edit the Web application for my particular csp/<namespace>  to point to /csp/healthshare/<namespace> rather than pointing to csp/<namespace> to fix this. 

Did you write manual code to handle the namespace or was you ever able to get this working?

Thank you for the help, here's what I used and did essentially:

    S TRSTR="<tr><td><span>one</span></td><td>two</td></tr>"

    S CMD="node ../pathToNodejsFile/file.js """_TRSTR_""""
    S DEV="|CPIPE|1"
    S EMPTY=0
    open DEV:CMD:0 
    while EMPTY<3 {
        use DEV read line
        set EMPTY=$s($l(line):0,1:$i(EMPTY))
        I line'=""  D
        . use 0 write line,! ; use 0 makes the write go to the default device - if you pass in an IO device you could say `use IO write line` and output to the IO device you have opened if you need to output somewhere other than the default terminal
    }
    use 0 
    close DEV

Though not the full answer, your comment motivated me and helped me to digging through documentation online to solve my total problem within the Cache environment to get their username (rather than listening to file changes with node.js and using file auditing with Windows server for user info)

I replied with what helped me to our answer and I’ll mark yours as correct. Thanks again! Stay blessed

No problem, I hope your project stays active and has a long future!

 

Thank you for your help! I was already using the OnAfterCompile hook, but didn't realize the OnAfterSave method would work for other file times, and it did ^_^

 

Also, to solve my problem of getting the username, there is a variable that gets set up when a user logs in apparently called

 

    $USERNAME

 

which is what I will be using to help with my problem.

Thanks for your time and help again, I would still be working on this issue if it wasn't for you

I see what you're saying. After I posted the question, actually that's what I ended up resorting to yesterday but Im having to guess on which files are actually in the project because I don't know for sure because It's not ALL of the files in the directory, I still would like to do that however or at least have a list generated of what files are in this studio project so I can know

but to answer you this would be because  not all of the files that we use on the server are necessarily part of the project and we always keep Studio's project with all of the files needed for production. Like if we create a new file that will be used for production we then immediately add it to the project. I cant remember exactly but its like tools -> Add -> [file menu comes up] and here you select the file.

Anyways,  this list or export of these items (either one) is really what Im after so I can have that compatability of the studios project items file structure in my git repo without all of the other items that arent meant for production

 

Hopefully that makes sense

I already wrote the perl script to do if. It's like 30 lines of code. I was using it because I was exporting the whole project with csp files and int files. 

Literally the only thing I have left to finish is the export like done with studio GUI but have it done programmatically. 

I saw in the documentation you can use studio from the windows command line but I couldn't find/figure out how to have it export the whole project through an argument.

 

thanks so much for your reply! I will look into everything you mentioned!

Custom git tool for GitHub. 

Ive read the documentation on the source control hooks, but I'm more interested in exporting all files from the database into typical file system files that I can have my way with in perl since I use that language often for working with files

 

For now I don't want to implement the check in and checkout for single files at a time. This is a startup so I'm trying to get everything stable first

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