Cancel
Showing results for 
Search instead for 
Did you mean: 

FindObject Failure in FEM Mesh Generator

Creator
Creator

Hello,

I'm relatively new to NXOpen (Journal).

So I'm trying to automate an FEM Simulation to understand the vibration characteristics of my part.
While trying to do that, I have two problems.

1) In journal I recorded the generation of the 3d tetrahedral mesh. Everything as usual.
But when I start the code, there is an Error with the mesh generator. The critical line of code is the following:

mesh3dTetBuilder1 = meshManager1.CreateMesh3dTetBuilder(NXOpen.CAE.Mesh3d.Null)


It gives the NXException: Internal Error. I can fix this error by clicking on "3D Tetrahedral" and opening the window for the mesh generator (opened in the picture below)
If the window is opened, the error won't be raised. So it needs to be opened somehow. Is there an command to automatically open it?

2) The window is opened and if I continue the journal, it raises a different error, because of this code:

component1 = workSimPart.ComponentAssembly.RootComponent.FindObject("COMPONENT part 1")
cAEBody1 = component1.FindObject("PROTO#CAE_Body(1)")
added1 = mesh3dTetBuilder1.SelectionList.Add(cAEBody1)

 

My guess is, that the main problem occurs, because of the "FindObject()".

During recording I selected the body of the part, so somehow some information getting lost here.

As I read in here, some people refer to it as the "stickiness problem".

So I need to get the Body of my part (which is a single part and not an assembly) without using the FindObject command.

After that I think the mesh should be easily generated.

 

setting.png

Greetings from germany and thanks in advance,
Elefkasius

2 REPLIES 2

Re: FindObject Failure in FEM Mesh Generator

Siemens Phenom Siemens Phenom
Siemens Phenom

@Elefkasius , This is the right forum for this question.

Regards,
Samadhan

GTAC | NX Help: NX1102 | NX1202 | NX1847
Please mark post as an "Accepted Solution", if it answers your question/is more helpful!

Re: FindObject Failure in FEM Mesh Generator

Creator
Creator

Okay found the solution!

 

change this:

component1 = workSimPart.ComponentAssembly.RootComponent.FindObject("COMPONENT xxxINDIVIDUALPARTNAMExxx 1")

    cAEBody1 = component1.FindObject("PROTO#CAE_Body(1)")

    added1 = mesh3dTetBuilder1.SelectionList.Add(cAEBody1)

   

to that:

anzahl, bodytag = theUfSession.Sf.AskAllPolygonBodies()

    tag = convert(bodytag)

    obj2=NXOpen.TaggedObjectManager.GetTaggedObject(tag)

    added1 = mesh3dTetBuilder1.SelectionList.Add(obj2)

 

Now I can generate the mesh.