How to adjust the Serviceability Limits in SteelDesignServiceabilityConfigurations #289
-
I would like to know if it is possible to adjust the serviceability limit settings with Python. I couldn't find any parameters for SteelDesignServiceabilityConfigurations that would allow you to do this. That's why I made a simple model in RFEM6 in which I adjusted the characteristic limit: I then used the WSscripGenerator example to create a script from this model, hoping that I would be able to find the appropriate parameter in the script. Unfortunately, no parameter appeared for this at SteelDesignServiceabilityConfigurations:
In fact, when I run the script, it creates a model with the steel addon not even enabled... See QuestionServiceabilityLimit.zip. What am I doing wrong? Am I missing something? Kind regards, Martin Francke |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hello @MFE-VIRO , Thank you for reaching us. At the moment, we can not excess steel design sls with python. Although, you can set steel design sls with javaScript. So, you can create temporary .js file and which you can run in python with help of run_script() function. Here, I have attached small example of it. import os
baseName = os.path.basename(__file__)
dirName = os.path.dirname(__file__)
from RFEM.enums import *
from RFEM.initModel import Model, SetAddonStatus
from RFEM.BasicObjects.material import Material
from RFEM.BasicObjects.member import Member
from RFEM.BasicObjects.section import Section
from RFEM.BasicObjects.node import Node
from RFEM.SteelDesign.steelServiceabilityConfiguration import SteelDesignServiceabilityConfigurations
def BeamLimitCharacteristic(value: int = 100, sls_no = 1):
with open(dirName+r"./sls_char.js", "w") as std:
std.write("STEEL_DESIGN.steel_design_sls_configurations[{}].settings_ec3.property_sl_beam_limit_characteristic = {}".format(sls_no, value))
Model.clientModel.service.run_script(dirName+r"./sls_char.js")
os.remove(dirName+r"./sls_char.js")
def BeamLimitFrequent(value: int = 100, sls_no = 1):
with open(dirName+r"./sls_char.js", "w") as std:
std.write("STEEL_DESIGN.steel_design_sls_configurations[{}].settings_ec3.property_sl_beam_limit_frequent = {}".format(sls_no, value))
Model.clientModel.service.run_script(dirName+r"./sls_char.js")
os.remove(dirName+r"./sls_char.js")
def BeamLimitQuasi(value: int = 100, sls_no = 1):
with open(dirName+r"./sls_char.js", "w") as std:
std.write("STEEL_DESIGN.steel_design_sls_configurations[{}].settings_ec3.property_sl_beam_limit_quasi_permanent = {}".format(sls_no, value))
Model.clientModel.service.run_script(dirName+r"./sls_char.js")
os.remove(dirName+r"./sls_char.js")
Model(True,'Demo')
SetAddonStatus(Model.clientModel, AddOn.steel_design_active)
Node()
Node(2, 5,0,0)
Material()
Section()
Member(1,1,2,0,1,1)
SteelDesignServiceabilityConfigurations()
BeamLimitCharacteristic(100, 1)
BeamLimitFrequent(150)
BeamLimitQuasi(250) This is just demo example. You can just copy the functions in your file and easily you can call with value and sls_no in your model. Let me know if this solution work for you or not. Best regards, |
Beta Was this translation helpful? Give feedback.
-
Hello @heetrojivadiya, Thanks for your quick response. I will try to implement the solution soon, but in any case it seems like a solution that could work well for me. |
Beta Was this translation helpful? Give feedback.
Hello @MFE-VIRO ,
Thank you for reaching us. At the moment, we can not excess steel design sls with python. Although, you can set steel design sls with javaScript. So, you can create temporary .js file and which you can run in python with help of run_script() function. Here, I have attached small example of it.