Book a Demo

Author Topic: Does a shapescript get embedded in an existing element?  (Read 3205 times)

peterc

  • Guest
Does a shapescript get embedded in an existing element?
« on: January 21, 2019, 11:00:27 pm »
I am writing a Shapescript to add a coloured bar to a requirement element based on it's Importance Tagged Value. I got it all working but then discovered that element notes could not be displayed on a diagram.

I may have got to the bottom of it as I can create new elements that work (I originally included a test of the rectanglenotation property and only applied the shapescript if it was 0). But all existing elements still don't display their notes (although they do pickup my new shapescript as the bar comes and goes depending on whether I have it included in my shapescript or not). If I delete the element from the diagram and drag it back in from the project browser then the notes do re-appear.

It seems like something has got embedded either on the element or, perhaps more likely, on the diagram object. Diagram Properties has Elements ticked and the Compartment Visibility on the specific Object has no effect.

Has anyone experienced this before that can help me solve existing diagrams (I'm guessing I may need to script a change).

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Does a shapescript get embedded in an existing element?
« Reply #1 on: January 22, 2019, 12:46:33 am »
If you're supplying a shape script you are responsible for anything that will be displayed. If you need the notes then print them where you need them.

q.

peterc

  • Guest
Re: Does a shapescript get embedded in an existing element?
« Reply #2 on: January 22, 2019, 12:56:33 am »
At the end of my Shapescript I have included "DrawNativeShape", which is handling that for me (well it seems to). Is that not the right thing to do (this is the first time I've tried to use shapescripts!).

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Does a shapescript get embedded in an existing element?
« Reply #3 on: January 22, 2019, 02:05:47 am »
How about posting your script. If you call DrawNative at the end it will just show the native shape (including the notes).

q.