InstanceSpecification - slot

Hello,

There is a possibility to create IInstanceSpecification and add Classifier.
How can I define Slot for this IInstanceSpecification and set value for structural feature of Classifier?

Thanks,
anita.w

Hi Anita.W,

Sorry for my late reply. Please refer to the flash movie about how to define slot and set value for structural feature of classifier at:

http://files3.visual-paradigm.com/200806/FlashDemo/define_slot.htm

If there are any further inquiries, please do not hesitate to contact me.

Best regards,
Lilian Wong

Hello,
I am trying to create InstanceSpecification with the Open API, but the following code does not work correctly:

IInstanceSpecification instance = IModelElementFactory.instance().createInstanceSpecification();
instance.addClassifier(classA);
instance.setName("RT_UML instance");

instance.addSlot(new ISlot());

What’s wrong with that code? Any help is appreciated.

Thank you in advance.
anita

Hi Anita. W,

Thanks for your reply. ISlot is an Interface, not a Class. You should call IModelElementFactory.instance().createSlot()

If there is anything else I can help, please feel free to ask.

Best regards,
Lilian Wong