Author Topic: Hidden DiagramLink shows IsHidden = false  (Read 3831 times)

ggandhi

  • EA User
  • **
  • Posts: 28
  • Karma: +0/-0
    • View Profile
Hidden DiagramLink shows IsHidden = false
« on: March 14, 2014, 08:59:53 pm »
If I use the Hide Connector option to hide a connector in a diagram, I would expect the automation interface to return DiagramLink.IsHidden = true. The following code snippet illustrates how my CSV-exporting JScript is driven by Links visible in the current diagram.  
 
for (var i=0; i < currentDiagram.DiagramLinks.Count; i++)
{
var link1 as EA.DiagramLink;
link1 = currentDiagram.DiagramLinks.GetAt(i);
if (link1.IsHidden)
{
Session.Output("This link should not be exported to CSV because link1.IsHidden");
}

If I use the Hide Connector option to hide a connector in a diagram, the automation interface still returns IsHidden = false.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Hidden DiagramLink shows IsHidden = false
« Reply #1 on: March 14, 2014, 10:02:13 pm »
Maybe you forgot to save the diagram before running your script.

q.

ggandhi

  • EA User
  • **
  • Posts: 28
  • Karma: +0/-0
    • View Profile
Re: Hidden DiagramLink shows IsHidden = false
« Reply #2 on: March 15, 2014, 04:28:20 am »
Qwerty is correct. I had forgotten to save the diagram before testing my code.  The JScrip code OK now.  Thank you QWERY. ::)