Hi guys,
I have a gift for you. One click and you are done !!
Put this in a ".BAS" file and paste it in the API directory : C:/Femap/api/elementupdate
Select all rigid elements that you want to update and don't forget to show the Rigid symbol thru F6/Labels,Entities and Color/Element-Rigid/DrawSymbol...
that will help you to better view the master and the slave nodes (master = dark)
Sub Main
Dim App As femap.model
Set App = GetObject(,"femap.model")
Dim fElem As femap.Elem
Dim fSet As femap.Set
Dim nodeCount As Long
Dim elemID As Long
Dim nodeArray As Variant
Dim faceArray As Variant
Dim weightArray As Variant
Dim dofArray As Variant
Dim nd1 As femap.Node
Set fElem = App.feElem
Set fSet = App.feSet
Set nodeSet = App.feSet
Set nd1 = App.feNode
' Select the rigid elements
rc = fSet.Select(8, 1, "Select Rigid Elements to be modified")
rc=App.feAppStatusShow(True,fSet.Count)
elemID = fSet.First()
While elemID > 0
icount=icount+1
rc = fElem.Get(elemID)
If fElem.type = 29 Then
If rc = -1 Then
rc = fElem.GetNodeList(0, nodeCount, nodeArray, faceArray, weightArray, dofArray)
If rc = -1 Then
' Print Element & Master Node
rc = nd1.Get(fElem.Node(0))
oldMaster = fElem.Node(0)
newMaster = nodeArray(0)
nodeArray(0)=oldMaster
fElem.Node(0)=newMaster
rc = fElem.PutNodeList(0, nodeCount, nodeArray, faceArray, weightArray, dofArray)
rc = fElem.Put(elemID)
End If
End If
End If
rc=App.feAppStatusUpdate(icount)
elemID = fSet.Next()
Wend
'End
rc=App.feAppStatusShow(False,fSet.Count)
End Sub
Best regards.