Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: MarcinG on May 08, 2025, 09:28:24 pm

Title: VB Scripting - Pattern object ?
Post by: MarcinG on May 08, 2025, 09:28:24 pm
Hi,

Is anyone aware if Design Patterns are scriptable ?  In other words - I can programmatically created packages, add diagrams, and add elements to those diagrams.  But can I add defined pattern (https://sparxsystems.com/enterprise_architect_user_guide/17.0/modeling_languages/umlpatterns.html)(s) to diagrams ?

Best regards
Marcin
Title: Re: VB Scripting - Pattern object ?
Post by: Geert Bellekens on May 08, 2025, 09:44:56 pm
I'm not sure, I've never really used any of those pattern.

What I did do in the past is use a "template" package to create a effectively create a pattern by first duplicating the package, and then renaming certain items.

IIRC the patterns are stored as an xmi export somewhere. If you can find that location, you can import it using a script.

Geert