Modify Pattern via Pro/Toolkit
Modify Pattern via Pro/Toolkit
(OP)
Hi all,
i am writing a Pro/Toolkit Application, that can modify dimensions and pattern. The application can now modify dimensions but not for pattern. Is there any body, who has accessed pattern via Pro/Toolkit? Will you me some hints?
Thanks
Zuardy
i am writing a Pro/Toolkit Application, that can modify dimensions and pattern. The application can now modify dimensions but not for pattern. Is there any body, who has accessed pattern via Pro/Toolkit? Will you me some hints?
Thanks
Zuardy





RE: Modify Pattern via Pro/Toolkit
it would be nice if you could explain your problem a bit more explicitly. maybe then i can help you a bit...
debanjan
RE: Modify Pattern via Pro/Toolkit
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);
}
}
RE: Modify Pattern via Pro/Toolkit
i am sorry i can't help you on this. Why don't u register an put your query in the following link.
http://www.prouser.org/exploder/index.html
This link is dedicated purely to people working on Pro/TOOLKIT.
Regards,
Debanjan
db@hitechesoft.com
RE: Modify Pattern via Pro/Toolkit
thanks for your hint on this adress
regards,
zuardy