How to write into Cache classes, routines etc
Hello, guys.
I have an external file that contains data in UDL format(as in Studio, not XML) and I need to somehow overwrite my source file with that file.
I tried to use this snippet for .mac file
w rtn.Code.WriteLine("some text")
It says that status is 1, but I don't see any difference in my source file.
Is there any way to overwrite source files, not only .mac but .cls, .int, .dfi?
I haven't done this before, but I am pretty sure you have to call %Save in order to apply your changes.
Thank you, I forgot about that completely
It's a right way, but don't you think, that you forgot to save your changes ? something like this
w rtn.%Save()
or you can just use $system.OBJ.Load("les.mac") or $system.OBJ.Load("some.class.cls") in versions 2016.2+
if you have less version but not less then 2014.1, you can load class with %Compiler.UDL.TextServices as I've already offered to use it for export on stackoverflow
Thanks, %Compiler.UDL.TextServices really helped for class importing/exporting