Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: adelano on June 24, 2016, 04:06:57 am

Title: Custom Toolbox element and the Attribute compartment
Post by: adelano on June 24, 2016, 04:06:57 am
Is there a way to create a custom tool bar element such that

1) when the tool bar element is selected & dropped from the toolbar in to a package that one or more attributes are predefined?

2) that the attribute compartment shows up in the diagram like it does when a class has attributes?



Thanks,

Alex
Title: Re: Custom Toolbox element and the Attribute compartment
Post by: qwerty on June 24, 2016, 04:15:25 am
Not directly. From the toolbar you can create just a plain metatype that is in no way composite. You only can apply the composition to existing elements. A way to create attributes/operations would be to use an add-in that subscribes to OnNew events.

q.
Title: Re: Custom Toolbox element and the Attribute compartment
Post by: Eve on June 24, 2016, 09:51:09 am
1) You can define toolbox items that are based on a pattern. This will allow you to include predefined attributes.

2) The attribute compartment will be displayed for any types that you create based on types that already display it, and either don't apply a main shape script or call drawnativeshape within that shapescript.