Hi,
I created an «ArcGIS» Workspace model from scratch (using the ArcGIS workspace extension/ pattern). My model is quite extensive and now I realize that EA left virtually all 'tagged values' for attribute columns empty. Examples are "IsNullable" or "Length" etc.
Many of the ArcGIS tags for fields have a default value. For example IsNullable is a boolean value, set to true by default. Even though length has an empty/0 value by default, the exporter will insert the valid ArcGIS default of 50. You get a warning for that, which you can ignore if you're content with 50. Otherwise you should specify a valid length value for your fields.
If you actually see an empty value for say IsNullable, please let us know which version of Enterprise Architect you are using. It would also be worth sending a note to Sparx support so they can investigate further.
The user interface to enter tagged values is what I consider somewhat "user hostile" meaning that if I have to enter these tags manually it will take me months.
There are two interfaces for editing tags. I find the dockable view handy (Main Menu | View | Tagged Values). It refreshes as you select another element or field (UML attribute). It can be handy if you need to edit a specific tag for numerous elements or attribtues - especially when the values for that tag vary per element/attribute.
Is there an automated way to do populate these tags (at least with default values?)
Yes you can automatically populate tagged values. A Model Script is probably the easiest/safest way. But if it is just to insert default values for the ArcGIS profile tags, you should not need to bother.
I am not sure which errors are show stoppers but when I run the validation script I get an error on line 1702
ArcGIS™.ValidateArcGISModel error: Overflow: 'CInt', Line:1702
If CInt(length) > MAX_TEXT_LENGTH Or CInt(length) < MIN_TEXT_LENGTH Then
Here the validation script should definitely be improved by using CLng instead of CInt. I guess you inserted a length value greater than 32,767 and CInt blows a fuse over that. We'll get that corrected forthwith.
Now the script was in the process of reporting a warning. From memory, only file geodatabases allow you to have string lengths greater than 255 characters. So a schema with string fields above that limit probably won't work if implemented on other types of geodatabase. If you're ok with that and really want string fields wider than 32,767 characters, you can stop the validation script from complaining:
At line 1702, change CInt to CLng in both places (you could probably even do a global search/replace for this throughout the script)
At line 147, change MAX_TEXT_LENGTH from 255 to whatever limit you like.
You can get the script code here, along with instructions on how to import it into Enterprise Architect (so as to workaround the issue with the built-in script):
http://www.sparxsystems.com/arcgis/model-validation.htmlThis is also where we will first post the updated script before it gets rolled into an Enterprise Architect release to update the built-in script.
Anyways I am somehow getting the impression that this extension doesn't get too much use. Has anybody used this extension before and successfully produced an XML model?
Apart from myself, I know others outside of Sparx that generate ArcGIS XML Workspace documents and import them to ArcCatalog successfully. It gets a fair thrashing along the way, but we obviously haven't used strings wider than 32K yet. As with other types of automated schema generation, there is some set up and model config involved. So there's a learning curve, but hopefully not too steep.
I hope this helps.
Ben