Book a Demo

Author Topic: Custom Toolbox element and the Attribute compartment  (Read 5019 times)

adelano

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Custom Toolbox element and the Attribute compartment
« 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

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Custom Toolbox element and the Attribute compartment
« Reply #1 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.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Custom Toolbox element and the Attribute compartment
« Reply #2 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.