Continue to Site

Welcome to MCAD Central

Join our MCAD Central community forums, the largest resource for MCAD (Mechanical Computer-Aided Design) professionals, including files, forums, jobs, articles, calendar, and more.

How to define ProElempathitem in toolkit

ajoy

New member
In toolkit how can i define ProElemPathitem , if i want to retrieve ProValue of


PRO_E_HLE_DEPTH in a hole feature ?
 
ajoy,


You need to read the API Wizard under User's Guide->Principles of Feature Creation->Feature Inquiry. This section will help you get a better understanding of how feature trees work. Also, the feature tree for the hole feature is located in ProHole.h. Here is your answer:


Assuming you have a ProFeature handle to the hole feature follow these steps.

  1. <LI>ProFeatureElemtreeCreate</LI>
    <LI>ProElempathAlloc</LI>
    <LI>Fill an array of type ProElempathItem of size 2.</LI>

    1. <LI>pro_elemPathItem[0].type = PRO_ELEM_PATH_ITEM_TYPE_ID</LI>
      <LI>pro_elemPathItem[0].path_item.elem_id = PRO_E_HLE_COM</LI>
      <LI>pro_elemPathItem[1].type = PRO_ELEM_PATH_ITEM_TYPE_ID</LI>
      <LI>pro_elemPathItem[1].path_item.elem_id = PRO_E_HLE_DEPTH</LI>
    <LI>ProElempathDataSet passing the element path from #1 and the array of ProElempathItem from #3 and the number of elements in the array (2).</LI>
    <LI>ProElemtreeElementGet passing the element path from #4.</LI>
    <LI>PRO_E_HLE_DEPTH is of type PRO_VALUE_TYPE_INT so now call ProElementIntegerGet.</LI>
    <LI>ProFeatureElemtreeFree</LI>
 

Sponsor

Back
Top