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

How i can get feature parameter via toolkit API?

SOLVED
Highlighted
Level 12

How i can get feature parameter via toolkit API?

Hi, i tried to get feature parameter via toolkit api.

 

this code i used.

ProError status = PRO_TK_NO_ERROR;
ProSelection *sels;
ProModelitem mdltem;
ProParameter param;
ProParamvalue proval;
//ProMdl mdl;

int nSels;
status = ProSelect( "feature", 1, NULL, NULL, NULL, NULL, &sels, &nSels);
if (nSels < 1 || status != PRO_TK_NO_ERROR)
{
return status;
}
ProSelectionModelitemGet(sels[0],&mdltem);

status = ProParameterInit(&mdltem,L"DISTANSE",&param);
if(status == PRO_TK_NO_ERROR)
{
ProParameterValueGet(&param, &proval);
sprintf(FileC,"distance : %f",proval.value.d_val);
ProMessageDisplay(MSGFIL,"USER %0s",FileC);

}
else
{
ProMessageDisplay(MSGFIL,"USER %0s","No Distance");
}
return status;

 

ProParameterInit appears to be able to fetch only the parameters for the model (ProMdl for parts, assemblies, etc.).

How do I get the parameters of a feature?

 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: How i can get feature parameter via toolkit API?

Sorry, i misspelling DISTANSE ..

i change parameter name from DISTANSE to DISTANCE.

and then i got the feature parameter value.

1 REPLY 1

Re: How i can get feature parameter via toolkit API?

Sorry, i misspelling DISTANSE ..

i change parameter name from DISTANSE to DISTANCE.

and then i got the feature parameter value.