Learning Python, DS from VBA?

I guess the VBA is not a common asked question but there’s a reason in the title.

I’m a recently graduated Engineer and currently doing my Master’s in BIM. We’re about to reach the structures part of the Master and I saw that it will involve programming in Dynamo. Based on what I’ve been reading here, a lot of people say that I should learn DS, others mention Python. Not starting a discussion on which is better, but what are the pros and cons of each? Why should I pick one or the other?

I know how to program basic stuff in VBA, small macros that automate my tasks. Would that help me jump from one language or the other?

Keep in mind I’m still fairly green on the workforce and really green on the BIM environment, so I’m essentially open to whichever path will lead to more opportunities.

1 Like

I just started using python coding in my scripts but i never even thought about the differences. I always thought DS was a simplified version of Python. And I wasn’t sure if DS allowed the Revit API to be used etc. I personally made my decision on the fact that DS code blocks can get very large at some point…
I’m following this topic as you made me interested as well.

The landscape may have changed a bit, but this post is still relevant:

Personally, I would definitely recomend Python over any other language. Not a master of it, but already got so much out of it! For example, at my office they were trying to short big amounts of data in a particular way, impossible to do it in DS or excel. A bit of help with pandas, a Python library, and job done in an afternoon (including research time). Also, with python you can move to any other program and apply it to so many cool stuff! (machine learning, machine visualization, data processing…you name it!)

1 Like

I actually found that very specific debate, which I how I ended up in this forum. What I got from it is that it was very situational - i.e. if you don’t want to change then go with DS, if you might consider changing then go with Python.

I’m a Civil Engineer so I feel like I don’t have a lot of room to change programming-wise. I might be wrong though which is why I’m asking here in the forum.

EDIT: I might wanna edit the first post as well, but I have been researching and I a few tutorials (including one from Autodesk themselves) using C#, but I don’t really see anybody talking about it. Would anybody recommend that?

1 Like

C# is likely the most robust.

You are right that the reasoning is situational.

Python can be picked up in a week, but takes much longer to learn. Design Script can be picked up in a day, but also takes much longer to learn. Hopefully the trend of ‘getting started is easy, but mastering takes awhile’ is clear.

The big advantage of Design Script is that if you don’t know how, or what you want, then Design Script allows you step back into the visual programming, so you get instant and immediate feedback at each sequential function so you can see what’s up. With textural code you have to modify your output along the way to do such debugging. If you’re a visual person, that helps quite a bit. Add in node to code and you’re pretty much flying. It does limit you to the dlls which you load into Dynamo at launch and dlls added to Dynamo via package manager though.

Curious to know what program you’re in that they are using Dynamo for structures in a civil engineering perspective. Dynamo for Civil3D 2020 just launched as well, so you might want to check that out.

1 Like

Thanks for the input!

I’m not 100% sure as I haven’t got there yet, but apparently we will be using Revit to design bridges and tunnels. Once I get the hang of it, I’ll definitely check Civil 2020.

You can actually redirect stdout to a text file as demonstrated in this post, which allows you to use the print statement as you normally would. Far from ideal, but it works completely fine.