>Opposite of "save as class":
>
>If I have an object on a form, I can convert it to a class with the command "Save as Class".
>
>Is there a way to do this the other way, convert a class to an object on the form? I know I can place an instance of a class, but in this case I want to use the object in one single form, and eliminate the class.
>
>The class is inherited from some custom class. Right now, I am creating an instance of the custom class on the form, and manually copying the PEMs. I was thinking there should be a faster way, but there doesn't seem to be.
You may need to write a little builder. Place an instance of the parent class of your object on the form, and get a variable refering to it via aSelObj(). Open your custom class for editing and get another variable refering to it. Now get all the nondefault PEMs for it (via aMembers(), I think "UC" would be the proper third parameter), and then loop through the array it got you, copying PEMs from the second object into the first:
objOnForm.AddProperty("pemname", getpem(obj2, "pemname"))
For methods, instead of .AddProperty use .WriteMethod, but beware: as Nad.. Naomi said, it won't work for new methods that the parent class didn't have. They will be written into your object, but they'll be lost when you save your form. You may want to add them as abstract methods to the parent class before you start this.