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

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

How i can get feature parameter via toolkit API?

CHASEONHO
18-Opal

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?

 

ACCEPTED SOLUTION

Accepted Solutions

Sorry, i misspelling DISTANSE ..

i change parameter name from DISTANSE to DISTANCE.

and then i got the feature parameter value.

View solution in original post

1 REPLY 1

Sorry, i misspelling DISTANSE ..

i change parameter name from DISTANSE to DISTANCE.

and then i got the feature parameter value.

Announcements


Top Tags