Retrieving External Data
Functions Introduced:
For improved performance, external data is not loaded automatically into memory with the model. When the model is in session, call the function
ProExtdataLoadAll() to retrieve all the external data for the specified model from the
Creo Parametric model file and put it in the workspace. The function needs to be called only once to retrieve all the data.
Note that the function
ProExtdataLoadAll() provides better performance than
ProExtdataClassNamesList(),
ProExtdataSlotNamesList(), and
ProExtdataSlotRead() because these functions load only specific information (class names, slot names, and slot files, respectively), which can be slow.
The
ProExtdataClassNamesList() function provides an array of the names of all the external data classes registered in a specified model.
The function
ProExtdataSlotIdsList() provides an array of the integer identifiers of all the slots in a specified class. The input is a
ProExtdataClass structure that must be set up manually or programmatically. The function
ProExtdataSlotNamesList() provides an array of the names of the slots in the specified class. The function allocates a term in the array for each slot, even if you did not assigned a name to the slot.
The function
ProExtdataSlotRead() reads the data type and data from a specified slot. Its input is a
ProExtdataSlot structure that must be set up manually. There is also an input argument to show whether the slot is identified by name or by integer. The function outputs the data type, the number of bytes (if the data type is stream or section), and a pointer to the data itself.
The
ProExtdataSlotRead() function allocates memory for the data it outputs. To free this memory, call
ProExtdataFree().
|
Note:
|
If you call ProExtdataSlotRead() multiple times and do not free the memory, the function uses the same memory for each call.
|