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

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

ProParamvalueValueGet

GK_9680876
3-Visitor

ProParamvalueValueGet

I am using Creo Parametric 4.0 M040

Not able to fetch the value(d_val) from the ProParamvalueValueGet, I am able to see the value in the visual studio while debugging but printing the value is causing issue and getting return as 0.000.
ProCableparam *spoolParams = NULL;
int spoolParamQty = 0;

status = ProSpoolParametersCollect(&spools[h], &spoolParams);


status = ProArraySizeGet(spoolParams, &spoolParamQty);

for (int j = 0; j < spoolParamQty; ++j)
{

status = ProSpoolParameterGet(spools, L"DENSITY", spoolParams);

double density=0.0;
static char line[500];
ProParamvalue proval;

status = ProParamvalueValueGet(((ProParamvalue*)&spoolParams[j].param_value.value.value.d_val), PRO_PARAM_DOUBLE, &density);

fprintf(lf, "\n density: %f\n", density);


Here are the errors that I faced
compiling perfectly but not getting the value(d_val)
1 REPLY 1
RPN
17-Peridot
17-Peridot
(To:GK_9680876)

There is so much demo code, you should have a closer look. What you do, will not work 😓

 

Spoiler

ProParamvalue value;
pars is the ProArray

for( i = 0; i < n; i++ )

    {

      value.type = PRO_PARAM_VOID;

        status = ProParameterValueGet(&pars[i], &value);

        

        // Wstring param name in pars[i].id

        

        switch( value.type )

        {

            case PRO_PARAM_DOUBLE:

                // Integer Value is in value.value.d_val

                

                break;

...

 

Top Tags