An analytical link element that is used to create connections between other Analytical Elements.
Namespace:
Autodesk.Revit.DB.Structure
Assembly:
RevitAPI
(in RevitAPI.dll) Version: 23.0.0.0 (23.1.0.0)
Since:
2013
Syntax
Examples
Copy
C#
public void ReadAnalyticalLinks(Document document)
{
FilteredElementCollector collectorAnalyticalLinks = new FilteredElementCollector(document);
collectorAnalyticalLinks.OfClass(typeof(AnalyticalLink));
IEnumerable<AnalyticalLink> alinks = collectorAnalyticalLinks.ToElements().Cast<AnalyticalLink>();
int nAutoGeneratedLinks = 0;
int nManualLinks = 0;
foreach (AnalyticalLink alink in alinks)
{
if (alink.IsAutoGenerated() == true)
nAutoGeneratedLinks++;
else
nManualLinks++;
}
string msg = "Auto-generated AnalyticalLinks: " + nAutoGeneratedLinks;
msg += "\nManually created AnalyticalLinks: " + nManualLinks;
TaskDialog.Show("AnalyticalLinks", msg);
}
Copy
VB.NET
Public Sub ReadAnalyticalLinks(document As Document)
Dim collectorAnalyticalLinks As New FilteredElementCollector(document)
collectorAnalyticalLinks.OfClass(GetType(AnalyticalLink))
Dim alinks As IEnumerable(Of AnalyticalLink) = collectorAnalyticalLinks.ToElements().Cast(Of AnalyticalLink)()
Dim nAutoGeneratedLinks As Integer = 0
Dim nManualLinks As Integer = 0
For Each alink As AnalyticalLink In alinks
If alink.IsAutoGenerated() = True Then
nAutoGeneratedLinks += 1
Else
nManualLinks += 1
End If
Next
Dim msg As String = "Auto-generated AnalyticalLinks: " & nAutoGeneratedLinks
msg += vbLf & "Manually created AnalyticalLinks: " & nManualLinks
TaskDialog.Show("AnalyticalLinks", msg)
End Sub