Cancel
Showing results for 
Search instead for 
Did you mean: 

Mesh3dTetBuilder Internal Error

Creator
Creator

Hi,

 

I am trying to change the script of a journal, to eliminate the "FindObject"-Method.

Why is the following code producing an exception?

First:

theSession = NXOpen.Session.GetSession()
workSimPart = theSession.Parts.BaseWork

And then I changed this:

femPart1 = theSession.Parts.FindObject("ipw_ohneTwist_SCHLICHTEN_BLOCK1_fem1")

fEModel1 = femPart1.FindObject("FEModel")

meshManager1 = fEModel1.Find("MeshManager")

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

-> NXOpen.NXException.Internal error

 

to that:

 

femPart1 = workSimPart.FemPart
fEModel1 = femPart1.BaseFEModel
meshManager1 = fEModel1.MeshManager
mesh3dTetBuilder1 = meshManager1.CreateMesh3dTetBuilder(NXOpen.CAE.Mesh3d.Null)

-> still an NXOpen.NXException.Internal error

 

Any ideas?

Thanks.

4 REPLIES 4

Re: Mesh3dTetBuilder Internal Error

Phenom
Phenom

are you trying to edit/update an existing 3d Mesh or create a new one?

The error may have nothing to do with your edit if the orignal recorded (with the Findobject) worked

Production: NX.CAE 10.0.2.6
Development: VB.NET (amateur level !)

Re: Mesh3dTetBuilder Internal Error

Creator
Creator

For creating a new one.

 

The main problem is, that the window "3d Tetrahedral mesh" needs to stay opened for the rest of the code.

Otherwise it throws an exception:

Look here (problem 1)):

https://community.plm.automation.siemens.com/t5/NX-Programming-Customization-Forum/FindObject-Failur...

 

Greetings

 

 

 

Highlighted

Re: Mesh3dTetBuilder Internal Error

Solution Partner Legend Solution Partner Legend
Solution Partner Legend

Hi,

 

have you tried switching to the fem part first with code?

It seems to me (from your screenshot), that your code is running while the NX/Simcenter session resides in the sim part..(?)

 

So maybe try:

Using loadstatus1 As PartLoadStatus = Nothing
Dim status1 As NXOpen.PartCollection.SdpsStatus
status1 = theSession.Parts.SetDisplay(theFemPart, False, True, loadstatus1)
End Using

and afterwards calling your mesher-code?

 

regards,

MGeyer

Re: Mesh3dTetBuilder Internal Error

Creator
Creator

You are correct!

Thanks, now it works :-)