API RDm engine solver error

Hi all,

I’m currently working on a script to do the steel verification using the API. Im working with this inside a python schript.
I got some good examples(excel vba) but my script won’t work. This is the error i get:

this is what is written inside the API SDK document of the steel design(written for C#)

This is how i have written it in my code:
Line 48 RDmEngine.Solve()
I guess that i’m missing the part which says ‘Nothing’ but dont know how to write it/how to add it.
This is the full code i’m using.
import clr
from Autodesk.DesignScript.Geometry import *

from System import Environment
user = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)
clr.AddReferenceToFileAndPath(user +r"\Dynamo\Dynamo Core\1.3\packages\Structural Analysis for Dynamo\bin\RSA\Interop.RobotOM.dll")
from RobotOM import *
from System import Object
#The inputs to this node will be stored as a list in the IN variables.
objects = IN[0]
#File = IN[1]
#Location = IN[2]
application = RobotApplicationClass()
project = application.Project
structure = project.Structure
labels = structure.Labels
project.CalcEngine.AnalysisParams.IgnoreWarnings = True
calcEngine = project.CalcEngine
calcEngine.AutoGenerateModel = True
calcEngine.UseStatusWindow = True
#project.SaveAs(Location+"\\"+ File +".rtd")
#project.SaveAs("D:\\Werk\Robot\Dynamo files ontwikkeling\BFS-optimo learn\Modellen\test 7\Modeltest.rtd")
RDMServer = IRDimServer
RDMServer = application.Kernel.GetExtension("RDimServer")
#RDMServer = (IRDimServerMode.I_DSM_STEEL)#werkt niet
RDMServer.Mode = 1
RDmEngine = IRDimCalcEngine
RDmEngine = RDMServer.CalculEngine
#optional use it if you want to set calculation parameters by the code
RDMCalpar = IRDimCalcParam
RDMCalCnf = IRDimCalcConf
RDMCalpar = RDmEngine.GetCalcParam()
RDMCalCnf = RDmEngine.GetCalcConf()
RdmStream = IRDimStream
RdmStream = RDMServer.Connection.GetStream()
RDMCalpar.SetObjsList(IRDimCalcParamVerifType.I_DCPVT_MEMBERS_VERIF, RdmStream)
RdmAllResObjType = IRDimAllResObjectType
RdmAllRes = IRDimAllRes
RdmDetRes = IRDimDetailedRes
RdmAllRes = RDmEngine.Results()
RdmAllResObjType = 1
#RdmAllResObjType = RdmAllRes.ObjectsType(IRDimAllResObjectType.I_DAROT_VERIFIED_MEMBER)
#ObjCnt = RdmAllRes.ObjectsCount
RDmRetValue = IRDimMembCalcRetValue
RDmRetRes = IRDimDetailedRes
#RDmRetRes = RdmAllRes.Get(1)
#RDmRetRes = RDmEngine.Results(1)
#RdmDetRes = RdmAllRes.Get(1)
#Case = RdmDetRes.GovernCaseName
#Ratio = RdmDetRes.Ratio
#OUT = Case, Ratio
OUT = RdmAllRes
#OUT = "goed bezig"

Maybe someone of you know a solution?

All files are attached.
Calc steel design 0_03.dyn (3.8 KB)
Can’t upload my robot file for file use this link to RSAforum
Thanks in advance

Gr Edward

Hello all,

@Maciek_Kubica @JacobSmall @Kibar
I hope someone of you can help me with this or tag someone who may know how to solve is?

Many thanks in advance

Gr Edward

Robot isn’t an application I know or have installed so not much I can do here. It does appear you’re using an older Dynamo build (there is a reference to 1.3) so I can recommend updating to 2.0.4 if you’re in Revit 2017-2019.

@JacobSmall thanks for your reply.
I know that i reference to dynamo 1.3, that’s because i use Dynamo studio without using revit.

Ah! Upgrade to sandbox then if possible. That 1.3 version is holding you back in many ways.

thanks for your reply. i will consider it.
but for now i’m still trying to find the solution for the problem with the script.

do you know other forum members who know maybe a little more on this subject?

Not offhand but I’ll see if I can find someone later today.

it’s not necessary anymore. After a hint on the robot stuctural analysis forum
i changed the line with solve into:
Don’t know why it’s working but now i get the result i want.
Calc steel design 0_04.dyn (3.9 KB)

1 Like

Hi @1234eddie,

I’m sorry for the late response but I was on vacations and didn’t have access to email.
From the conversation above I see that you managed to solve the problem.
Feel free to contact us if you encounter further issues with steel design. Althoug personally I’m not an expert in this field I’ll be happy to connect you with the right person on the team.

Kind Regards,

1 Like