Category Archives: OCL

Getting taggedvalues in runtime without code

When you use WECPOF you can create a whole system with use of the Model alone. As you do you might want to pick up information stored in the TaggedValues of the model. You can do that like this: G.allinstances->first.oclType.TaggedValue(‘Eco.PresentationUnit’) … Continue reading

Posted in OCL, WECPOF | 1 Comment

Custom types and custom operations in OCL

We got this Question: I have an attribute of type TestStruct defined on a class. TestStruct is defined as follows: Code Snippet public struct TestStruct : IComparable {   public int Int1 { get; private set; }   public int Int2 { … Continue reading

Posted in EcoActionLanguage, OCL | 1 Comment

Modlr plugin

A Plugin interface is an easy way to allow for you to add your own extensions. We have now extended the Plugin with yet another interface to facilitate the adding of custom ocl operations. This way the design time functions … Continue reading

Posted in CO-Unique, Modlr, OCL, Plugin | 7 Comments

The oclSingleton ocl operator

There is an operator in ocl that I bet you do not know about yet: oclSingleton. Use it like this: Class1.oclSingleton <and follow with operations or navigations on that single instance> If Class1 does not have an instance at the … Continue reading

Posted in OCL, UML | Leave a comment