Book a Demo

Author Topic: DiagramObject.ShowInheritedAttributes how to use  (Read 10253 times)

localhro2

  • EA Novice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
DiagramObject.ShowInheritedAttributes how to use
« on: March 08, 2016, 02:15:20 am »
All,

I don't see any documentation on how to use the DiagramObject method ShowInheritedAttributes. Does anyone know how to use them? I've tried setting it as Boolean or integer or even strings without luck. It is not documented in any of the API documentation.

Any ideas or thoughts would be greatly appreciated.

Thanks,

Sean Conway

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: DiagramObject.ShowInheritedAttributes how to use
« Reply #1 on: March 08, 2016, 03:53:14 am »
Sean,

I do find this:
Quote
ShowInheritedAttributes
Boolean
Notes: Show inherited attributes for this object on the diagram.
at http://www.sparxsystems.com/enterprise_architect_user_guide/12.1/automation_and_scripting/diagramobjects.html

You must have looked at the wrong location.

Geert

localhro2

  • EA Novice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Re: DiagramObject.ShowInheritedAttributes how to use
« Reply #2 on: March 08, 2016, 04:07:10 am »
Thanks Gert, I really appreciate it man.

So I tried this with no luck:

diaElement = newDiagram.DiagramObjects.AddNew("l=200;r=320;t=20;b=140;","");
      diaElement.ElementID = currElement.ElementID;
      diaElement.ShowInheritedAttributes = true;
      diaElement.Update;   
      newDiagram.Update;
      contextPackage.Update;

The flag doesn't change. Am I doing something wrong?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: DiagramObject.ShowInheritedAttributes how to use
« Reply #3 on: March 08, 2016, 05:26:10 am »
Looks fine to me, but I've never used that flag before.
Have you tried Sparx support?

If all else fails you can still bypass the API and change it directly in the database using Repository.Execute.

Geert

localhro2

  • EA Novice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Re: DiagramObject.ShowInheritedAttributes how to use
« Reply #4 on: March 08, 2016, 06:30:09 am »
I sent support an email. Nothing yet, but I'll let you know what they say. I'll also try the Repository.Execute. Thanks for the help!