ElectricalSetting.RemoveWireMaterialType Method

ElectricalSettingRemoveWireMaterialType Method

Note: This API is now obsolete.

Remove the wire material type from project.

Namespace: Autodesk.Revit.DB.Electrical
Assembly: RevitAPI (in RevitAPI.dll) Version: 26.0.4.0 (26.0.4.0)
Syntax
[ObsoleteAttribute("RemoveWireMaterialType is deprecated in Revit 2026 and will be removed in a future version of Revit. Please use Document.Delete() instead.")]
public void RemoveWireMaterialType(
	WireMaterialType materialType
)
<ObsoleteAttribute("RemoveWireMaterialType is deprecated in Revit 2026 and will be removed in a future version of Revit. Please use Document.Delete() instead.")>
Public Sub RemoveWireMaterialType ( 
	materialType As WireMaterialType
)
public:
[ObsoleteAttribute(L"RemoveWireMaterialType is deprecated in Revit 2026 and will be removed in a future version of Revit. Please use Document.Delete() instead.")]
void RemoveWireMaterialType(
	WireMaterialType^ materialType
)
[<ObsoleteAttribute("RemoveWireMaterialType is deprecated in Revit 2026 and will be removed in a future version of Revit. Please use Document.Delete() instead.")>]
member RemoveWireMaterialType : 
        materialType : WireMaterialType -> unit 

Parameters

materialType  WireMaterialType
The wire material type to be removed.
Exceptions
ExceptionCondition
InvalidOperationException Wire material type can be removed only if it is not currently assigned to any wire type, and the last one wire material type can't be removed, otherwise an exception will be thrown.
See Also