Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get bodies and faces in a Fem model ?

Status
Not open for further replies.

zmedwael

Aerospace
May 2, 2013
20
FR
Hi every one , i have a small problem.
i'm trying to get faces to change color depending on the face type , but this in not the probleme i managed to do that but only when i'm working in modeling module.
i need to do the same for Advanced simulation (.fem parts) module.
i tried to change work to basework in this code but it still works only in the modeling module (ie .prt).

" Dim workPart As object = s.Parts.baseWork
Dim bodies As BodyCollection = workPart.Bodies
For Each b As Body In bodies
For Each f As Face In b.GetFaces "

Thank you.

 
Replies continue below

Recommended for you

It has been a while since I last used the FEA module, but at that time the model was added as a component of the FEA part (master model method). If this is the work flow you are using, the component will not show up in the work part's body collection, but rather it is a child component. You can get a reference to the component and change its face/body colors or you can work with the prototype of the occurrence if you want the changes to show up in the model file.

www.nxjournaling.com
 
Thanks Cowski for the reply ,
can you explain please how can i get a reference to the component and make some changes (not only changing colors what i have in mind but also doing a mesh and create coordinate systems dependent on the suface type , but this is not the problem , my problem is i cant get faces in fem part) .
i managed to do that by using a selectobjects method , but i want to create a journal that would do that automatically without prompting the user to select anything.

thanks.
 
Let's back up a step so I'm clear on the starting point.
When you are working on your FEM part, are you working on the model itself, or an occurrence (a component)?

www.nxjournaling.com
 
sorry i didn't understand , but here how it goes , i open the part as *.prt in nx , then i pass to advances simulation module so NX creates to other parts , the first is *.prt file which is called idealized part , the second is *.fem file , and all the work is done on this file (meshing the part) , when i use selectobjects methodes with a face filter on a *.fem part NX treat them as CAE.caeface , and unlike the *.prt file there is no face collector for a fem parts .
I hope this will clarify the probleme.
thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top