Author Topic: Custom vs default shape rendering in diagram  (Read 4119 times)

adepreter

  • EA User
  • **
  • Posts: 187
  • Karma: +10/-9
    • View Profile
Custom vs default shape rendering in diagram
« on: August 15, 2011, 09:45:44 pm »
Hello,
Does anybody know how to disable Shape Scripts based on some diagram property or custom tag?

Basic Requirement
- Context: a specific diagram
- Default behavior: Shapes are rendered following shape scripts associated with stereotypes.
- Alternative behavior (when a diagram property or custom tag is set to X): Default shape rendering is applied; Shape scripts are ignored


Solutions that we are trying to select custom or default shape rendering in a diagram
1.      Use existing diagram option in the core Sparx product
      Problem: Option not found; no documentation found

2.      Access existing diagram properties from Shape Script
      Problem: How to access current diagram properties in a Shape Script? No documentation found

3.      Define custom diagram tags and access these from Shape Scripts
      Problem: No documentation found

Thanks

Alain

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +54/-3
    • View Profile
Re: Custom vs default shape rendering in diagram
« Reply #1 on: August 16, 2011, 08:52:10 am »
Quote
Does anybody know how to disable Shape Scripts based on some diagram property or custom tag?
There is a shape script command: drawNativeShape()

Quote
How to access current diagram properties in a Shape Script? No documentation found
On this page there is a list of properties you can test against in shape scripts. Look at those beginning "diagram."
The Sparx Team
[email protected]

adepreter

  • EA User
  • **
  • Posts: 187
  • Karma: +10/-9
    • View Profile
Re: Custom vs default shape rendering in diagram
« Reply #2 on: August 16, 2011, 04:40:20 pm »
Good. So I will set a stereotype value on the diagram and access the value  in the Shape Script to decide about what is to be displayed.

Thank you for the useful input.

Alain