Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X
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.
*/
Hi Sir. Thanks for your reply
I'm using Creo 3.0 'ProSolidBodySurface' is not available, so I use 'ProSolidSurfaceVisit' but i don't get any value.
my query is I wanna visit each ASM component then i want to visit each component surface.
for visiting each ASM component i use 'ProSolidDispCompVisit' is this correct or else i need to add any API call?
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.
I got it. Thanks for your Guidance.