What is purpose of the function ProExtdataLoadAll in C Toolkit?
Looks like I can read external data using ProExtdataSlotRead without calling ProExtdataLoadAll.
So, what is ProExtdataLoadAll? Data will be loaded to where?
Solved! Go to Solution.
Yaroslav,
From my understanding, it works something like this:
ProExtdataLoadAll is just faster than having to go grab/visit each of the classes and slots individually. Basically, it loads the data into RAM so that you can then get the data from that slot.
If you have one specific slot, with a hard-coded name, and can easily read/write to that class and slot, your performance should be pretty quick and it won't make a difference. However, if you have a lot of external data, calling ProExtdataSlotRead loads it all at once, making all future calls much faster.
As added proof - here's what the Toolkit documentation says about it:
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.
Hope this helps.
Thanks,
James Sullivan
President & Founder
Yaroslav,
From my understanding, it works something like this:
ProExtdataLoadAll is just faster than having to go grab/visit each of the classes and slots individually. Basically, it loads the data into RAM so that you can then get the data from that slot.
If you have one specific slot, with a hard-coded name, and can easily read/write to that class and slot, your performance should be pretty quick and it won't make a difference. However, if you have a lot of external data, calling ProExtdataSlotRead loads it all at once, making all future calls much faster.
As added proof - here's what the Toolkit documentation says about it:
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.
Hope this helps.
Thanks,
James Sullivan
President & Founder