---
title: "removeOutputPort(forKey:)"
framework: quartz
role: symbol
role_heading: Instance Method
path: "quartz/qcplugin/removeoutputport(forkey:)"
---

# removeOutputPort(forKey:)

Removes the output port for a given key.

## Declaration

```swift
func removeOutputPort(forKey key: String!)
```

## Parameters

- `key`: The key associated with the port that you want to remove.

## Discussion

Discussion This method throws an exception if called from within the execute(_:atTime:withArguments:) method, if there is not an output port with that key, or if the port is created from a property.

## See Also

### Adding Ports Dynamically

- [addInputPort(withType:forKey:withAttributes:)](quartz/qcplugin/addinputport(withtype:forkey:withattributes:).md)
- [removeInputPort(forKey:)](quartz/qcplugin/removeinputport(forkey:).md)
- [addOutputPort(withType:forKey:withAttributes:)](quartz/qcplugin/addoutputport(withtype:forkey:withattributes:).md)
