Book a Demo

Author Topic: Shape script to draw a rectangle around the out of the box shape  (Read 5892 times)

Modesto Vega

  • EA Practitioner
  • ***
  • Posts: 1183
  • Karma: +30/-8
    • View Profile
Is it possible to write a shape script to draw an additional rectangle around any out of the box rectangular shape - e.g. class, component, objects, ports and so? If so, how?




qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Shape script to draw a rectangle around the out of the box shape
« Reply #1 on: September 22, 2020, 06:42:00 am »
I guess it should be possible. DrawNativeShape and then RoundRect(-10, -10, 110, 110, 20, 20) should draw a round rect outside of the native shape.

q.

Modesto Vega

  • EA Practitioner
  • ***
  • Posts: 1183
  • Karma: +30/-8
    • View Profile
Re: Shape script to draw a rectangle around the out of the box shape
« Reply #2 on: October 16, 2020, 03:41:02 am »
This partially works but draws the rectangle on top of the native shape instead of under it, which what I want.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Shape script to draw a rectangle around the out of the box shape
« Reply #3 on: October 16, 2020, 03:51:43 am »
Have you tried switching the order; first RoundRect(-10, -10, 110, 110, 20, 20)  and then DrawNativeShape()?

Geert

Modesto Vega

  • EA Practitioner
  • ***
  • Posts: 1183
  • Karma: +30/-8
    • View Profile
Re: Shape script to draw a rectangle around the out of the box shape
« Reply #4 on: October 16, 2020, 04:18:22 am »
Have you tried switching the order; first RoundRect(-10, -10, 110, 110, 20, 20)  and then DrawNativeShape()?

Geert
Switching the order around works. Thank you very much.