429x
003570
2019-09-10

Pregunta

¿Es posible crear liberaciones en nudos a través de la interfaz COM?


Respuesta:

Sí, es posible crear las liberaciones en nudo a través de la interfaz COM. Aquí hay un ejemplo:

Subnodal_release ()

Dim iApp As RFEM5.Application
Dim iModel As RFEM5.model
    
On Error GoTo e
    
Establecer iApp = GetObject (, "RFEM5.Application")
iApp.LockLicense
        
test = iApp.GetModelCount
Establecer iModel = iApp.GetModel (0)
        
Dim iModeldata As RFEM5.iModeldata
Set iModeldata = iModel.GetModelData
        
        
' for setting a nodal release a member hinge is needed
' the object for the axis system could not be the same with the released one
Dim nodRel As NodalRelease
nodRel.Location = OriginalLocationType
nodRel.AxisSystem = LocalFromLine
nodRel.AxisSystemFromObjectNo = 2
nodRel.Comment = "prueba de liberación del nudo"
nodRel.MemberHingeNo = 1
nodRel.NodeNo = 1
nodRel.ReleasedMembers = 1
        
iModeldata.PrepareModification
iModeldata.SetNodalRelease nodRel
iModeldata.FinishModification
        
        
e: If Err.Number <> 0 Then MsgBox Err.description`` Err.Source
    
iApp.UnlockLicense


End Sub


Hay que tener en cuenta que el sistema de ejes local puede que no se refiera al mismo elemento que aquellos que se han liberado.