Okie kokie
I am trying to set tagged values of a Package Stereotype.
That is:
1. I have created a stereotype whose metaclass is "Package".
2. I am trying to set the tagged values using script.
My script looks like this:
[Line 1] Set thisPackage = targetPackage.Packages.AddNew(packageName, "")
[Line 2] Set packageElement = thisPackage.Element
[Line 3] packageElement.Stereotype = stereotypeName
[Line 4] packageElement.SynchTaggedValues profileName, stereotypeName
However, once the interpreter gets to [Line 3] it tells me that there is an "Object Required" error.
Presumably this means that the call on [Line 2] to get a reference to the Element that underlies the package has failed.
What I would expect [Line 2] to do is give me the reference to the element that corresponds to/underlies the newly created package.
From then, I expected to be able to set the stereotype and syn the tagged values just like I would with a normal element.
But....this doesn't seem to be the case.
If anyone can help, it would be greatly appreciated.
Cheers
Jays
