I have an ArcObjects (9.3) Class Extension which has an event handler for OnCreate so that feature properties can be manipulated / assigned when a feature is first created.
Some of the functionality needs enclosing in an edit operation, which requires an IWorkspaceEdit object. As far as I know the only way I can get the IWorkspaceEdit is by getting the IEditor (extension) from IApplication, then grabbing the IEditor's EditWorkspace.
In an ArcObjects command (extending BaseCommand) I get the IApplication 'hook' passed on create (that is, the command's creation), so I can retain a reference to it. However, in the class extension's OnCreate method I am only passed the IObject which has been created. I can't see a way to get the IObject's workspace to work from that direction.
Can anybody please tell me
- How to access the calling IApplication from a class extension or,
- How to get an IObject's EditWorkspace or,
- Any other way to create an edit operation within a class extension's OnCreate method?
Any help very much appreciated.
