on 01-26-2017 4:37 PM
Hi,
I'm trying to create my own class in physical model. I've created extension which includes an ExtendedLink Metaclass from common model ( "Exclude from Metamodel" on the ExtendedLink unmarked). Secondly, i've created Stereotype MyArrow (with "Use as metaclass" selected).
I'm trying to create a script that would create MyArrow object from VBS. I'm able to create an object manually, i can create it when it is not an MetaClass - but i don't know how should i call CreateObject to create own extended metaclass.
could you provide some examples or explenation?
thanks, rafal
Hi guys,
i've finally found the way to create it - the answer seems logical when you know it :).
First i was trying to create it as it was some kind of the new metaclass so i tried to pass the public class name based on what i put in the extension to the create objec method.
The correct way is to create a regular object using the base class and then to change to the stereotype of the new metaclass.
dim obiekt
set obiekt = nothing
set obiekt = ActiveModel.createobject(cls_ExtendedObject) 'creation of the regular extended object, without subclassing
obiekt.name = "extended object own metaclass"
obiekt.stereotype = "OWN_EXTENDED_OBJECT" 'name of the stereotype which is also a metaclass
I hope that will help somebody 🙂
regards, rd
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please provide screenshot or model sample so we can better understand your question.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.