Forum

Robot Python – Structural Units

Home Forums Temas ou Discussões Robot Python – Structural Units

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • baave.gru
    Guest
    Post count: 172

    Hi

    I want to set units for moment. But I could not set moment unit as kN*m

    Robotapp = RobotApplicationClass()
    Project = Robotapp.Project
    Preferences = Project.Preferences
    Structure = Project.Structure
    Labels = Structure.Labels
    Units = Preferences.Units

    Project.Open(“C:\Temp\\Structure01.rtd”) # empty 3d robot model

    # Set units for force, moment and stresses
    RU = Preferences.Units.Get(IRobotUnitType.I_UT_FORCE)
    RU.E = False
    RU.Name = “kN”
    RU.Precision = 2
    Preferences.Units.Set(IRobotUnitType.I_UT_FORCE, RU)

    RUCD = Preferences.Units.Get(IRobotUnitType.I_UT_MOMENT)
    print(RUCD.Name)
    print(RUCD.E)xz
    RUCD.Name = “kN”
    RUCD.Precision = 2
    Preferences.Units.Set(IRobotUnitType.I_UT_MOMENT, RUCD)
    RUCD.Name2 = “m”
    Preferences.Units.Set(IRobotUnitType.I_UT_MOMENT, RUCD)

    kaneza
    Guest
    Post count: 172

    try this

    RUCD = RobotUnitComplexData(Preferences.Units.Get(IRobotUnitType.I_UT_MOMENT))
    RUCD.E = False
    RUCD.Name = “kN”
    RUCD.Name2 = “m”
    RUCD.Precision = 2
    Preferences.Units.Set(IRobotUnitType.I_UT_MOMENT, RobotUnitData(RUCD))

    Best regards

    kaneza
    Guest
    Post count: 172

    add also

    Units.Refresh

    baave.gru
    Guest
    Post count: 172

    Thank you Stephane

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.

Home Forums Temas ou Discussões Robot Python – Structural Units