Book a Demo

Author Topic: Conditionally displaying #notes# in Shape Scripts  (Read 2864 times)

KennMcHugh

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Conditionally displaying #notes# in Shape Scripts
« on: June 30, 2011, 11:17:19 pm »
Hi,

I'm creating some shape scripts for our planning models.  I would like these shapes to have the ability to display the element notes.  I am able to display the notes by printing the #notes# property, but there are two things I have not been able to accomplish.

1.  Display or hide the notes based on Feature Visibility, Notes Compartment flag.
I would like to be able to display notes on some elements, and hide them on others.  This is a basic feature of the default shapes, but I can not figure out how to reference that boolean value within the shape script.

2.  Scale the shape to an appropriate size to contain the notes.
For the default elements, if you choose the option to display the notes compartment, the shape will expand in size to contain the text.  This is not happening in my shape.  Instead, the text flows past the lower boundary of the shape.  This looks bad, and it causes the layout functions to fail.  They arrange the elements based on the size of the container, not based on the text that has overrun the container.

I have read all of the included documentation on shape scripts.  It seems pretty sparse.  The few example scripts in the documentation don't provide enough information on building complex shapes.

Also, if there is somewhere that we could view the script for the UML shapes that ship with EA, I could probably figure out what to do from those examples.  

If anyone has suggestions, I would appreciate it.

Thanks,
Kenn