Cancel
Showing results for 
Search instead for 
Did you mean: 

API for RBE3 UM DOF

Experimenter
Experimenter

Hi,

Is there any way to access the UM DOF part of an RBE3 using the API? I have looked in the documentation and have no problem creating RBE3 and assigning the desired DOFs, but have not found anything related to the UM DOF.

 

 

14 REPLIES

Re: API for RBE3 UM DOF

Siemens Phenom Siemens Phenom
Siemens Phenom

Use the method app.feElem.GetNodeList ( listINDEX, nodecount, node, face, weight, dof ).

 

Sample code below to list out the DOFs for Dependent/Independent Nodes on a Rigid Element:

 

The HTML Clipboard

Sub Main
    Dim App As femap.model
    Set App = feFemap()

    Dim rc As femap.zReturnCode

    Dim el As femap.Elem
    Set el = App.feElem
    Dim elID As Long
    Dim nc As Long
    Dim nodeIDs As Variant
    Dim nodeID As Long
    Dim faceIDs As Variant
    Dim wgts As Variant
    Dim DOFs As Variant
    Dim msgString As String

    SelectRigidElement:
    rc = App.feSet.SelectID ( FT_ELEM, "Select Rigid Element", elID )
    If rc <> FE_OK Then
        End
    End If

    el.Get ( elID )
    If el.type <> 29 Then
        GoTo SelectRigidElement
        el.Put ( elID )
    End If

    el.GetNodeList ( 0, nc, nodeIDs, faceIDs, wgts, DOFs )
    el.Put ( elID )

    App.feAppMessage ( FCM_HIGHLIGHT, _
        ("For Rigid Element ID" + Str$(nodeIDs(0)) + ":") )
    For i = 1 To nc-1
        nID = nodeIDs(i)
        msgString = "    Node" + Str$(nodeIDs(i)) + " DOFs ="
        For dof = 0 To 5
            msgString = msgString + Str$(DOFs((i*6)+dof))
        Next dof
        App.feAppMessage ( FCM_HIGHLIGHT, msgString )
    Next i

End Sub

 

 

Best Regards,
Chip Fricke
Principal Applications Engineer - Femap Product Development

Re: API for RBE3 UM DOF

Experimenter
Experimenter

Thanks Chip for the quick reply and sample code.

 

However, this accesses and lists the DOFs for the independent nodes of a RBE3. I have no issue with this part, and used the inverse (.PutNodeList) to generate the RBE3 in the first place.

 

I am looking for a way to assign the UM DOF. See below.

 

RBE3 Dialog.PNG

UMDOF Dialog.PNG

Re: API for RBE3 UM DOF

Siemens Phenom Siemens Phenom
Siemens Phenom

The API does not have a method for assigning UM DOFs for RBE3 elements.

 

A workaround would be to embed a Program File into your API where you first generate the RBE3, prompt for the UM Nodes and DOFS, then use these to generate a Program File.  You could also just edit the created RBE3 to start a Program File that prompts for the UM Nodes.

Best Regards,
Chip Fricke
Principal Applications Engineer - Femap Product Development

Re: API for RBE3 UM DOF

Experimenter
Experimenter

Ah ok understood.

 

To the powers that be - might be worth adding that note to the documentation somewhere, so others don't spend a pile of time digging around for it.

 

Thanks again for the replies!

Re: API for RBE3 UM DOF

Pioneer
Pioneer
Hi
I am looking for An API to update the dependent nodes from TX,Ty,Tz,Rx,Ry,Rz to TX,Ty,Tz only

When I review my Rigid elements it shows the following for dependent nodes
Node 619012 DOFs = 1 1 1 1 1 1


Node 619012 DOFs = 1 1 1 0 0 0

I have ~ 50 rigid elements in my model.Is there an API already exists for this..?
Regards
srini

Re: API for RBE3 UM DOF

Siemens Genius Siemens Genius
Siemens Genius

Are they RBE2s or RBE3s?

 

You can try this:

The HTML Clipboard

Sub Main
    Dim App As femap.model
    Set App = feFemap()

    Dim rElem As femap.Elem
    Set rElem = App.feElem

    Dim eSet As femap.Set
    Set eSet = App.feSet

    Dim eID As Long
    Dim nc As Long
    Dim nodeIDs As Variant
    Dim nodeID As Long
    Dim faceIDs As Variant
    Dim wgts As Variant
    Dim DOFs As Variant

    Dim newDOFs(10000) As Variant

    eSet.AddRule(29, FGD_ELEM_BYTYPE)

    While eSet.Next
        eID = eSet.CurrentID
        rElem.Get(eID)

'''For RBE3s'''
        rElem.GetNodeList ( 0, nc, nodeIDs, faceIDs, wgts, DOFs )

            For i = 0 To nc - 1
                j = 6*i
                newDOFs(j) = 1
                newDOFs(j+1) = 1
                newDOFs(j+2) = 1
                newDOFs(j+3) = 0
                newDOFs(j+4) = 0
                newDOFs(j+5) = 0
            Next

        rElem.PutNodeList( 0, nc, nodeIDs, faceIDs, wgts, newDOFs)

'''For RBE2s'''
            rElem.release(0, 0) = 1
            rElem.release(0, 1) = 1
            rElem.release(0, 2) = 1
            rElem.release(0, 3) = 0
            rElem.release(0, 4) = 0
            rElem.release(0, 5) = 0

        rElem.Put(eID)
    Wend

End Sub

Re: API for RBE3 UM DOF

Pioneer
Pioneer

They are RBe3 Giampetro.

I will try your scipt

 

Regards

srini

Re: API for RBE3 UM DOF

Pioneer
Pioneer
Hi Giampietro
Its working perfect which I am expecting.
Thanks lot for your help

regards
srini

Re: API for RBE3 UM DOF

Pioneer
Pioneer

Hi Giampietro

How to update the master node to 123456 instead of 123 from the code

 

Because the API updates only the dependent nodes for both Rbe2 and Rbe3 .

is that we can control the DOF for independent node for both Rbe2 and Rbe3..?

 

Regards

srini