Migrate Dynamo studio to RSA with dynamo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all,
I found/read the article that dynamo studio will stop as a program inside the AEC collection.
at the moment i have a lot of scripts running on dynamo studio with the structural analysis package.
So after digging i will go over to RSA 2022 with dynamo extension. so i have to migrate my scripts.
but the problem which occurs is that i wrote a lot of python scripts inside the .dyn files. and these when i open the script wil run on 'ironpython2' and dynamo gives the message that i have to migrate to 'Cpython3'.
"Python Migraton"
This graph currently contains nodes that are using the old IronPython2 (Python 2) engine which will be deprecated in later versions. A new CPython3 (Python 3) has been implemented and is accessible inside the Python editor.
This is my old script which runs perfect with dynamo studio. and with dynamo add-on on RSA 2022(set to ironpython2)
import clr
clr.AddReference('ProtoGeometry')
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
USec_name= IN[0]
USec_mat = IN[1]
USec_B = IN[2]
USec_H = IN[3]
application = RobotApplicationClass()
project = application.Project
structure = project.Structure
labels = structure.Labels
lab_serv = IRobotLabelServer
lab_serv = labels
sec = IRobotLabel
sec = lab_serv.create(IRobotLabelType.I_LT_BAR_SECTION, USec_name)
data = sec.data
data.Type = IRobotBarSectionType.I_BST_NS_RECT
data.ShapeType = IRobotBarSectionShapeType.I_BSST_RECT_FILLED
nonst_data = IRobotBarSectionNonstdData
nonst_data = data.CreateNonstd(0)
nonst_data.SetValue(IRobotBarSectionNonstdDataValue.I_BSNDV_RECT_B,USec_B)
nonst_data.SetValue(IRobotBarSectionNonstdDataValue.I_BSNDV_RECT_H,USec_H)
#nonst_data.SetValue(IRobotBarSectionNonstdDataValue.I_BSNDV_RECT_T,0)
data.MaterialName = USec_mat
data.CalcNonstdGeometry()
lab_serv.Store(sec)
OUT = sec.name
this is the dynamo graph
this is the migration message
as you can see the ironpython2 works but the Cpython3 not.
the code inside Cpython3 is still the same as the code above. but i get this error message:
So my question is: did i miss something beceause dynamo is now an add-on or is there something else wrong.
please help me with this.
@Rafal.Gaweda @okapawal @vise92 @gwizdzm @StefanoPasquini6790 @JacquesGaudin saw your names in the forum post related to dynamo
thanks in advance
ps: file is attached.
Gr Edward