×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Modify Pattern via Pro/Toolkit

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

RE: Modify Pattern via Pro/Toolkit

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

RE: Modify Pattern via Pro/Toolkit

(OP)
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);      
  }
}

RE: Modify Pattern via Pro/Toolkit

(OP)
hi Debanjan,
thanks for your hint on this adress

regards,
zuardy

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources