Question

I want to initiate a model validation via the context menu "Project > Model Validation > Validate selected" (1) and via a batch script (2).

For realizing (1) I followed the sparx documentation [1]. This works fine.

But I can't find a suitable API method for starting a model validation for (2). Does an equivalent function exist?

With kind regards MK

[1] http://www.sparxsystems.com/enterprise_architect_user_guide/9.2/automation/validation.html

Was it helpful?

Solution

Yes, you're just looking in the wrong place.

What you're looking at there is the documentation for validation callbacks into an Add-In, which is how you implement your own validation rules. The methods to execute a validation are in the Project class.

The Project is a singleton, accessed from the Repository class, which is also a singleton and which is available in the context of an executing script.

Note, however, that there are no API calls to select which validation rules are used; this can only be done via the GUI. Which makes the whole exercise a little frustrating.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top