<!--
{
  "availability" : [
    "FxPlug: 4.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "professional_video_applications",
  "identifier" : "/documentation/professional_video_applications/FxParameterCreationAPI_v5/addCustomParameter(withName:parameterID:defaultValue:parameterFlags:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Professional Video Applications"
    ],
    "preciseIdentifier" : "c:objc(pl)FxParameterCreationAPI_v5(im)addCustomParameterWithName:parameterID:defaultValue:parameterFlags:"
  },
  "title" : "addCustomParameter(withName:parameterID:defaultValue:parameterFlags:)"
}
-->

# addCustomParameter(withName:parameterID:defaultValue:parameterFlags:)

Creates a custom parameter and adds it to the plug-in’s parameter list.

```
func addCustomParameter(withName name: String, parameterID: UInt32, defaultValue: any NSCopying & NSSecureCoding & NSObjectProtocol, parameterFlags flags: FxParameterFlags) -> Bool
```

## Parameters

`name`

Name of the parameter in the user interface.

`parameterID`

Unique identifier for a parameter. Used to retrieve, set, or validate the parameter.

`defaultValue`

Initial entry for the parameter.

`flags`

Flags that encode various state values for the parameter.

## Return Value

Returns `YES` if the application successfully creates a custom parameter; `NO` otherwise.

## Discussion

The `defaultValue` argument is an instance, created by the plug-in, of the custom parameter’s class, which must conform to the <doc://com.apple.documentation/documentation/Foundation/NSCoding> protocol. `NSCoding` is used for serializing and unserializing the custom parameter’s value object for saving and loading.

> Note: Your implementation of <doc://com.apple.documentation/documentation/Foundation/NSSecureCoding> (`-encodeWithCoder:` and `-initWithCoder:`) must use keyed coding. If you have a custom parameter, you must implement the `FxCustomParameterInterpolation_v2` protocol for your custom class and implement the ``doc://com.apple.professionalvideoapplications/documentation/professional_video_applications/FxTileableEffect/classes(forCustomParameterID:)`` method in your plug-in.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)