Thanks. That was very helpful, and I was able to cobble together a utility for it. The only thing I am missing is the method description. There is a parameter in WriteMethod() to include the description, but I can't find how to get it from the original class/method. Is there a function for that?
>>Does anyone know of an existing utility that will copy a method from one class to another? I am splitting up a large class with many methods into multiple classes. I figured something like this would be in Thor/PEM Editor, but I could not find it.
>
>The quick and dirty way is to create a copy and then delete the stuff you don't need. Or you can edit the source class, create a reference using aselobj() and then oRef.SaveAsClass(oref.ClassLibrary, "newName") (assuming it will go into the same classlib), or create a new class, get a reference to it the same way, and then
>
>oRefToNew.writemethod("methodname", oRef.GetPem("methodname"), .t.)
>
>(the third parameter is needed if you're adding a custom method)
>
>In the case of .saveAsClass() and a new/different classlib, make sure that you use a path in the filename or else it may create it in the current folder.