Hi Debanjan,
first thank for the response.
Below is part of my codes. It fails on the call of ProValueDataGet(). I am not sure, that i have the right array/tree of elempath_data[]. May be i have misunderstood the description about Element tree in the Pro/Toolkit manual. What i want to do with Pattern is just modifying his member number, i.e, PRO_E_PAT_FIRST_DIR_NUM_INST.
Thanks in advance.
Zuardy
static ProElempathItem elempath_data[] = {
{PRO_ELEM_PATH_ITEM_TYPE_ID, PRO_E_PATTERN_ROOT},
{PRO_ELEM_PATH_ITEM_TYPE_ID, PRO_E_PAT_TYPE},
{PRO_ELEM_PATH_ITEM_TYPE_ID, PRO_E_PAT_REF},
{PRO_ELEM_PATH_ITEM_TYPE_ID,
PRO_E_PAT_REGEN_METHOD},
{PRO_ELEM_PATH_ITEM_TYPE_ID, PRO_E_PAT_FIRST_DIR},
{PRO_ELEM_PATH_ITEM_TYPE_ID,
PRO_E_PAT_DIR_DIM_COMPOUND},
{PRO_ELEM_PATH_ITEM_TYPE_ID,
PRO_E_PAT_DIR_DIMENSION},
{PRO_ELEM_PATH_ITEM_TYPE_ID,
PRO_E_PAT_DIR_VAR_TYPE},
{PRO_ELEM_PATH_ITEM_TYPE_ID,
PRO_E_PAT_RELATION_EDIT},
{PRO_ELEM_PATH_ITEM_TYPE_ID,
PRO_E_PAT_FIRST_DIR_NUM_INST}
};
ProElempathAlloc(&p_elem_path);
nStatus = ProElempathDataSet(p_elem_path, elempath_data, 4);
if (nStatus == PRO_TK_NO_ERROR) {
ProValueAlloc(&p_value);
nStatus = ProFeatureElemValueGet(&feat,
p_elem_path, &p_value);
if (nStatus == PRO_TK_NO_ERROR) {
nStatus = ProValueDataGet(p_value, &value_data);
if (nStatus == PRO_TK_NO_ERROR) {
fprintf(pVisitData->pFile, "Number of Pattern = %d\n", value_data.v);
}
else { //Error occured
fprintf(pVisitData->pFile, "Error at function ProValueDataGet\n"

;
}
}
else { //Error occured
fprintf(pVisitData->pFile, "ProFeatureElemValueGet return %d\n", (int) nStatus);
}
nStatus = ProValueFree(p_value);
if (nStatus != PRO_TK_NO_ERROR) {
fprintf(pVisitData->pFile, "Error %d in module: %s, line %d. \n", nStatus, __FILE__, __LINE__);
return ((int) nStatus);
}
}