AnalyticalLinkCreate Method |
Creates a new instance of a AnalyticalLink element between two Hubs.
Namespace: Autodesk.Revit.DB.StructureAssembly: RevitAPI (in RevitAPI.dll) Version: 26.0.4.0 (26.0.4.0)
Syntaxpublic static AnalyticalLink Create(
Document doc,
ElementId type,
ElementId startHubId,
ElementId endHubId
)
Public Shared Function Create (
doc As Document,
type As ElementId,
startHubId As ElementId,
endHubId As ElementId
) As AnalyticalLink
public:
static AnalyticalLink^ Create(
Document^ doc,
ElementId^ type,
ElementId^ startHubId,
ElementId^ endHubId
)
static member Create :
doc : Document *
type : ElementId *
startHubId : ElementId *
endHubId : ElementId -> AnalyticalLink
Parameters
- doc Document
-
Document to which new AnalyticalLink should be added.
- type ElementId
-
AnalyticalLinkType for the new AnalyticalLink.
- startHubId ElementId
-
Hub at start of AnalyticalLink.
- endHubId ElementId
-
Hub at end of AnalyticalLink.
Return Value
AnalyticalLink
The newly created AnalyticalLink instance.
ExceptionsException | Condition |
---|
ArgumentException |
startHubId is not a valid Hub ID for an AnalyticalLink element.
-or-
endHubId is not a valid Hub ID for an AnalyticalLink element.
-or-
Thrown if startHubId or endHubId do not represent ids of Hubs.
-or-
Thrown if startHubId == endHubId.
-or-
Thrown if type does not represent an id of an AnalyticalLinkType.
|
ArgumentNullException |
A non-optional argument was null
|
See Also