cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

External data object function ProExtdataLoadAll?

YaroslavSin
17-Peridot

External data object function ProExtdataLoadAll?

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?

1 ACCEPTED SOLUTION

Accepted Solutions
sully7
13-Aquamarine
(To:YaroslavSin)

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

CadActive Technologies

President & Founder

President & Founder
CadActive Technologies - www.cadactive.com

View solution in original post

1 REPLY 1
sully7
13-Aquamarine
(To:YaroslavSin)

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

CadActive Technologies

President & Founder

President & Founder
CadActive Technologies - www.cadactive.com
Top Tags