C_CreateDiffraction

C_CreateDiffraction is used to create a new OrcaWave diffraction analysis object prior to performing a diffraction analysis. A typical sequence of calls is as follows:

Another common usage scenario is to query the results from an existing results file. A typical sequence of calls is as follows:

Setting the data

The data items required for a diffraction calculation are set in the same way as data items are set for model objects. Use the functions C_SetDataInteger, C_SetDataDouble, or C_SetDataString to set the data item values. The data item names are obtained from OrcaWave by selecting the data item of interest and pressing F7 or opening the popup menu and selecting the 'data names' option.

Data items in tables (for example WaveHeading) require an index value for each row, the first row has an index of 1. To set indexed data you must first set the table size by calling C_SetDataInteger with the data name of the count variable for that table.

Some indexed data items have their own associated table data. To access these data you need to first select the relevant row in the parent table and then subsequent calls to the associated data items will apply to this selected object. For example, for body data, call C_SetDataString to set the data item SelectedBody with the name of the body you want to edit the data for. Equivalently, you may call C_SetDataInteger to set the data item SelectedBodyIndex with the index of the required body.

The data-setting functions have corresponding data-getting functions: C_GetDataInteger, C_GetDataDouble, and C_GetDataString.

See Model building: Setting the data and Model building: More complex data for more explanation and examples for similar data items.

void C_CreateDiffraction(

TOrcFxAPIHandle *lpDiffractionHandle,

int *lpStatus

);

Parameters

lpDiffractionHandle (OUT)

Pointer to a TOrcFxAPIHandle variable in which the handle to the new diffraction analysis object is returned.

lpStatus (OUT)

Points to a variable in which the status result for the function call will be returned.