MultiCam Boards Documentation > MultiCam Documentation > MultiCam User Guide > MultiCam Basics > Parameters > Accessing a Parameter > Code Examples for setting a MultiCam Parameter > How to set an Enumerated MultiCam Parameter

How to set an Enumerated MultiCam Parameter

The mandatory MultiCam API functions to assign a value to an enumerated parameter are:

Function

Method

McSetParamInt

By-ident reference method
By-ident enumerated item reference method

McSetParamNmInt

By-name reference method
By-ident enumerated item reference method

McSetParamStr

By-ident reference method
By-name enumerated item reference method

McSetParamNmStr

By-name reference method
By-name enumerated item reference method

For the by-ident enumerated item reference method, the value to be assigned to the parameter is of the INT32 type.

For the by-name enumerated item reference method, the value to be assigned to the parameter is of the PCCHAR type.

Example

The following code sets the channel-class select-level enumerated parameter Camera to the value CAM2000 according to all four methods:

//Setting the parameter using the by-ident parameter
//and by-ident enumerated method

Status = McSetParamInt(ObjectHandle, MC_Camera, MC_Camera_CAM2000);

//Setting the parameter using the by-name parameter
//and by-ident enumerated method

Status = McSetParamNmInt(ObjectHandle, "Camera", MC_Camera_CAM2000);

//Setting the parameter using the by-ident parameter
//and by-name enumerated method

Status = McSetParamStr(ObjectHandle, MC_Camera, "CAM2000");

//Setting the parameter using the by-name parameter
//and by-name enumerated method

Status = McSetParamNmStr(ObjectHandle, "Camera", "CAM2000");

The Status variable can be used for error checking.