Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X
I am working on drafting , where I have to collect all dimension in drawing for this I used ProDrawingDimensionVisit() function but argument like visitAction & FilterAction need to pass Please help me to create dimension VisitAction Function
Solved! Go to Solution.
That's how your callback (visitaction) might look like:
ProError CollectDrawingDimensions(
ProDimension *dimension, ProError /*status*/, ProAppData data)
{
static_cast<vector<ProDimension>*>(data)->push_back(*dimension);
return PRO_TK_NO_ERROR;
}
Use it like this:
std::vector<ProDimension> vecDrwDimensions;
ProError err = ProDrawingDimensionVisit(
Drawing,
PRO_DIMENSION,
CollectDrawingDimensions,
NULL,
(ProAppData)&vecDrwDimensions);
...\Creo 8.0.0.0\Common Files\protoolkit\protk_appls\pt_examples\pt_dbase\TestDimension.c
That's how your callback (visitaction) might look like:
ProError CollectDrawingDimensions(
ProDimension *dimension, ProError /*status*/, ProAppData data)
{
static_cast<vector<ProDimension>*>(data)->push_back(*dimension);
return PRO_TK_NO_ERROR;
}
Use it like this:
std::vector<ProDimension> vecDrwDimensions;
ProError err = ProDrawingDimensionVisit(
Drawing,
PRO_DIMENSION,
CollectDrawingDimensions,
NULL,
(ProAppData)&vecDrwDimensions);
Thank you
Here is a handful of examples from our knowledge to grasp the concept of visiting with Creo Toolkit.
If needed have a refresh with Function Pointers: https://stackoverflow.com/questions/840501/how-do-function-pointers-in-c-work