cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

component Surface

Aravind98
13-Aquamarine

component Surface

In creo toolkit how to visit each component surface?

 

 

ACCEPTED SOLUTION

Accepted Solutions
RPN
17-Peridot
17-Peridot
(To:Aravind98)

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.      
 */

View solution in original post

4 REPLIES 4
RPN
17-Peridot
17-Peridot
(To:Aravind98)

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.      
 */
Aravind98
13-Aquamarine
(To:RPN)

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?

 

RPN
17-Peridot
17-Peridot
(To:Aravind98)

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.

Aravind98
13-Aquamarine
(To:RPN)

I got it. Thanks for your Guidance.

Announcements


Top Tags