extern ProError ProSolidBodySurfaceVisit (ProSolidBody *body,
ProSurfaceVisitAction visit_action,
ProAppData app_data);
/*
Purpose: Visits surface in a body
Input Arguments:
body - body
visit_action - action function
app_data - application data.
Output Arguments:
Return Values:
PRO_TK_NO_ERROR - Function is successful.
PRO_TK_E_NOT_FOUND- There are no surfaces in specified body.
*/
extern ProError ProSolidBodySurfaceVisit (ProSolidBody *body,
ProSurfaceVisitAction visit_action,
ProAppData app_data);
/*
Purpose: Visits surface in a body
Input Arguments:
body - body
visit_action - action function
app_data - application data.
Output Arguments:
Return Values:
PRO_TK_NO_ERROR - Function is successful.
PRO_TK_E_NOT_FOUND- There are no surfaces in specified body.
*/
At top level the component/feature ID is the path. Next you need to use ProAsmcomppathMdlGet(path in, model out). This model handle can be used to get all surface ids.
#
# Tcl code
# syncronous mode with an active assembly
#
foreach FID [ps_visit type COMPONENT] { set Model [ps_assy component $FID] set SurfIDs [ps_visit surfaces $Model]
# Now SurfIDs will contain a list of all surface IDs in Model
}
Note: If the component model is an assembly you may call the function recursive, because an assembly may not contain surfaces! And take care about the feature status.
Translate
Windchill Satisfaction Survey
Help shape the future of Windchill. Take our 5-minute survey and share your feedback.