General Mechanical

General Mechanical

Topics related to Mechanical Enterprise, Motion, Additive Print and more.

Set Remote Displacement with scripting

    • Santtu Siponen
      Subscriber

      I'm trying to set the XComponent value of Remote Displacement with scripting. I think the problem is on the last line and has something to do with the fact that it is originally set as 'Free'. Appreciate any help to fix my code!

      Code Below,

      model=ExtAPI.DataModel.Project.Model
      static_structural = model.Analyses[0]
      eigenvalue_buckling = model.Analyses[1]
      solution=eigenvalue_buckling.Solution
       
      x=1
       
       
      rd=static_structural.AddRemoteDisplacement()
      rd.Location=ExtAPI.DataModel.GetObjectsByName("ylaosa")[0]
       
      rd.XComponent.ToString
       
      rd.XComponent.Output.SetDiscreteValue(0, Quantity(x, "m"))

       

    • Santtu Siponen
      Subscriber

      Link to appropriate reference guide, https://storage.ansys.com/act/v190/ACTReferenceHTML/Mechanical/index.html#Reference.methode.Ansys.ACT.Mechanical.Fields.Variable.SetDiscreteValue.html

    • Erik Kostson
      Ansys Employee

       

      Hi

      You need this (see link) to make it work. Also as it is a ramped load time=0 can not have a displacement so start at next time point (see below).

      Thank you

      Erik

Viewing 2 reply threads
  • The topic ‘Set Remote Displacement with scripting’ is closed to new replies.