|
|
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:
C_CreateDiffraction to obtain a handle to a new diffraction analysis object.C_LoadDiffractionData if you wish to open an existing data file.C_SaveDiffractionData if you wish to save the data to file.C_CalculateDiffraction to perform the diffraction calculation.C_GetDiffractionOutput to query the results.C_SaveDiffractionResults if you wish to save the results to file.C_DestroyDiffraction to dispose of the resources associated with the handle.Another common usage scenario is to query the results from an existing results file. A typical sequence of calls is as follows:
C_CreateDiffraction to obtain a handle to a new diffraction analysis object.C_LoadDiffractionResults to open an existing results file.C_GetDiffractionOutput to query the results.C_DestroyDiffraction to dispose of the resources associated with the handle.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.
Pointer to a TOrcFxAPIHandle variable in which the handle to the new diffraction analysis object is returned.
Points to a variable in which the status result for the function call will be returned.