278x
003569
2022-08-26

Preguntas frecuentes 005304 | ¿Cómo puede un apoyo nodal con no linealidad 'Partial W ...

Pregunta:
¿Cómo se puede crear un soporte nodal con 'Acción parcial' no lineal a través de la interfaz COM?

Respuesta:
La siguiente macro de VBA muestra la creación de un soporte nodal con no linealidad 'Acción parcial'. El código fuente se puede encontrar en Descargas.

Opción explícita

'------------------------------------------------- --------------------
Soporte secundario ()
'------------------------------------------------- --------------------

  1. Dim model As RFEM5.model
  2. Dim data As IModelData

Soporte de atenuación (0) Como RFEM5.NodalSupport
Atenuar ISup como RFEM5.INodalSupport
Atenuar ISupPA como RFEM5.IPartialActivity
Dim nlPA como actividad parcial

  1. Establecer modelo = GetObject (, "RFEM5.Model")
  2. model.GetApplication.LockLicense
  1. On Error GoTo e
  1. Set data = model.GetModelData
  1. apoyo (0) .No = 1
  2. soporte (0) .NodeList = "1"
  3. soporte (0) .SupportConstantX = -1
  4. support (0) .SupportNonlinearityX = PartialActivityNLType
  5. support (0) .SupportConstantY = -1
  6. soporte (0) .SupportConstantZ = -1
  7. soporte (0) .RestraintConstantX = -1
  8. soporte (0) .RestraintConstantY = -1
  9. soporte (0) .RestraintConstantZ = -1
  1. data.PrepareModification
  2. Soporte de data.SetNodalSupports
  3. data.FinishModification
  1. Establecer ISup = data.GetNodalSupport (1, AtNo)
  2. Establecer ISupPA = ISup.GetNonlinearity (AlongAxisX)
  1. nlPA.PositiveZone = CompleteActivityType
  2. nlPA.PositiveSlippage = 0.005
  3. nlPA.NegativeZone = FailureActivityType
  1. data.PrepareModification
  2. ISupPA.SetData nlPA
  3. data.FinishModification

e: Si Err.Number 0 Entonces MsgBox Err.Description`` Err.Source

  1. Set data = Nothing
  2. model.GetApplication.UnlockLicense
  3. Set model = Nothing

End Sub