Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: ggandhi on March 14, 2014, 08:59:53 pm

Title: Hidden DiagramLink shows IsHidden = false
Post by: ggandhi 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.
Title: Re: Hidden DiagramLink shows IsHidden = false
Post by: qwerty on March 14, 2014, 10:02:13 pm
Maybe you forgot to save the diagram before running your script.

q.
Title: Re: Hidden DiagramLink shows IsHidden = false
Post by: ggandhi 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. ::)