Page 6 - Demo
P. 6
Interface to Python%uf09f%uf09fRCPConsult2017-2025Page 6Note:Functionand argument (vector)names are arbitrary.The other kind of script file may contain any set of commands in notation of Pythonlanguage but musthave a statement defining variable %u2019res%u2019as a final return value.importmathres=PAR1*(math.pi/4)*Strength*math.pow(Diameter,2)-PAR2*Loadorimportmathres=v_XP_[3]*(math.pi/4)*v_XP_[1]*math.pow(v_XP_[2],2)-v_XP_[4]*v_XP_[0]The creation of an interface script in correct notation is not trivial. To make it easier a template with some helpful data can be generated for a new script referenced in the simplified form of an interface function. After definition of required Symbolic Expressions and parsing a name of script will be shown in Reliability Job tree. Blue color means that this script file is not yet saved. Otherwise the colour of script name is red. For this state you can use right mouse click to activate a popup menu and select a script file of interest as shown below. The Script Editorwill be activated with a corresponding template content. Then you can modify text of script as you like. Use the Evaluation button in Script Editor toolbar to control syntax and numeric of your script.