Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Dave_Bullet on June 13, 2008, 11:46:44 am
-
Maybe I'm missing something really basic in the help...
I can add a "Date retired" attribute to my stereotype in my UML profile of type "date". How do I enforce users to only enter a date (ie. dd/mm/yyyy) in the tagged value window when creating a new element based on my stereotype (from my UML profile?)
Thanks,
DAvid.
-
Have a look at predefined tagged value types (http://www.sparxsystems.com.au/EAUserGuide/index.html?predefinedtaggedvaluetypes.htm) and then:
Create an MDG Technology that bundles your UML Profile and your tagged value type definitions into a single file. Then when you import the technology your target model is guaranteed to have the tagged value types.
You can get more than a text filter, you can get a date field complete with a date selector.
-
Hi Simon,
I looked at that, but couldn't figure out how to set / link the data type of the attribute in the stereotype.
Here's what I've got.
A <profile> called MyProfile
MyProfile contains a package <metaclass>
MyProfile contains a MyPackage <stereotype> that extends the package metaclass above
MyPackage stereotype contains a DateDeployed attribute.
I've tried setting the DateDeployed attribute type = DateTime - but that default is not observed when I add a new element of type MyPackage to the diagram. The DateDeployed tagged values gets created, but does not behave like a datetime with calendar picker.
Any ideas?
Thanks,
DAvid.
-
I've answered it myself. I was being dumb. I thought the tagged value type - became the data type of the attribute in the stereotype. That is wrong. The tagged value type IS = the NAME of the attribute itself (the type of the attribute doesn't matter).
All working now - thanks for the cross post. HEre if others want it:
http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1212434803/3#3
Cheers,
DAvid.