thanks a lot!
fact is
i have been play with 'vbapi_examples' for days...but i still can't make it works...
i think this example code is used to replace instance of specified part with its another instance.
so i created an assembly model includes a part with instances A and B,but it still doesn't work, throw an exception when app creating instance of new model.
and unfortunately, the model 'replaceinstance.sam' , use for vbapi_examples, is failed.it can't find mated component.