NewWire Method


Creates a new wire element.

Namespace: Autodesk.Revit.Creation
Assembly: RevitAPI (in RevitAPI.dll) Version: 2015.0.0.0 (2015.0.0.0)

Syntax

C#
[ObsoleteAttribute("This method is obsolete in Revit 2015. Please use Wire.Create() instead.")]
public Wire NewWire(
	Curve curve,
	View view,
	Connector startConnector,
	Connector endConnector,
	WireType wireType,
	WiringType wiringType
)
Visual Basic
<ObsoleteAttribute("This method is obsolete in Revit 2015. Please use Wire.Create() instead.")> _
Public Function NewWire ( _
	curve As Curve, _
	view As View, _
	startConnector As Connector, _
	endConnector As Connector, _
	wireType As WireType, _
	wiringType As WiringType _
) As Wire
Visual C++
[ObsoleteAttribute(L"This method is obsolete in Revit 2015. Please use Wire.Create() instead.")]
public:
Wire^ NewWire(
	Curve^ curve, 
	View^ view, 
	Connector^ startConnector, 
	Connector^ endConnector, 
	WireType^ wireType, 
	WiringType wiringType
)

Parameters

curve
Type: Autodesk.Revit.DB Curve
The base line of the wire.
view
Type: Autodesk.Revit.DB View
The view in which the wire is to be visible.
startConnector
Type: Autodesk.Revit.DB Connector
The connector which connects with the start point connector of wire, if it is a null reference ( Nothing in Visual Basic) , the start point connects with nothing.
endConnector
Type: Autodesk.Revit.DB Connector
The connector which connects with the end point connector of wire, if it is a null reference ( Nothing in Visual Basic) , the end point connects with nothing.
wireType
Type: Autodesk.Revit.DB.Electrical WireType
Specify wire type of new created wire.
wiringType
Type: Autodesk.Revit.DB.Electrical WiringType
Specify wiring type(Arc or chamfer) of new created wire.

Return Value

If successful a new wire element within the project, otherwise a null reference ( Nothing in Visual Basic) .

Exceptions

Exception Condition
Autodesk.Revit.Exceptions InvalidOperationException An InvalidOperationException will to be thrown when Revit MEP product is unavailable.

See Also