Book a Demo

Author Topic: hiding connectors using automation?  (Read 3439 times)

danielhsh

  • EA Novice
  • *
  • Posts: 14
  • Karma: +0/-0
    • View Profile
hiding connectors using automation?
« on: September 05, 2010, 07:51:40 pm »
is there a better way to hide connecters in a diagram? I tried to look up the manual, it seems nothing there. My current solution is using shape scripts, which is awful because it only hides the line, but not the arrow and the tag of the connector!

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: hiding connectors using automation?
« Reply #1 on: September 05, 2010, 10:00:43 pm »
You can set the IsHidden property of the appropriate DiagramLink object that corresponds to the connector on that diagram.

You will need to scan the Diagram's DiagramLinks collection to find the DiagramLink which references the appropriate connector object.

HTH,
Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

danielhsh

  • EA Novice
  • *
  • Posts: 14
  • Karma: +0/-0
    • View Profile
Re: hiding connectors using automation?
« Reply #2 on: September 07, 2010, 03:45:46 am »
thanks, I missed that one in the manual, sorry about that. I want to do that to elements too, but it seems there is no api for elements?

smendonc

  • EA User
  • **
  • Posts: 148
  • Karma: +5/-0
  • I love YaBB 1 Gold!
    • View Profile
Re: hiding connectors using automation?
« Reply #3 on: September 07, 2010, 07:31:54 am »
This can be done with diagram filters (v8+) but not through an api call afaik.  

If you meant simply removing an element from a diagram then use the diagramObject collection instead of the diagramElement collection, and delete the object representing the element you no longer want on the diagram.  

You might also try setting the display/style properties of the diagram object, however I haven't played around with the styles so don't know if hiding the object is possible.

Stan.

danielhsh

  • EA Novice
  • *
  • Posts: 14
  • Karma: +0/-0
    • View Profile
Re: hiding connectors using automation?
« Reply #4 on: September 07, 2010, 09:14:40 pm »
thanks for the reply, it is good to know. Althought it seems a bit strange element do not have this option, but connectors do.