Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Modify Pattern via Pro/Toolkit

Status
Not open for further replies.

zuardy

New member
Aug 22, 2001
126
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
 
Replies continue below

Recommended for you

Hi zuardy,
it would be nice if you could explain your problem a bit more explicitly. maybe then i can help you a bit...
debanjan
 
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);
}
}
 
hi Debanjan,
thanks for your hint on this adress

regards,
zuardy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor