Relative file path in Advance steel Dynamo

Hi all,

maybe I have just missed it but I can’t find it. Is it possible in Dynamo for Advance steel to somehow open an excel file that is in the same folder as the dynamo file? I have seen some different solutions for Revit but I miss some documents nodes and so on. In the other solution I am not that much of the programmer to pull it off with something from line programming.

Hope someone has a quick solution for this.

Thanks, Omar

Hi @omar-hav ,

The following Python Code works for me in Dynamo Sandbox 2.16:

import clr
clr.AddReference('DynamoServices')
from Dynamo.Events import *

OUT = ExecutionEvents.ActiveSession.CurrentWorkspacePath

Credits to @solamour 's GitHub, in combination with @Brendan_Cassidy :

1 Like

Hi Daan,

thank you for your reply. I am using Dynamo in Advance steel but I believe the issue for now is that I am not sure how to enter the code at all. I did it as in attached photo but I believe I am missing something.

Sorry, I sniffed around a bit more and figured out that there is a separate node for python scripts :sweat_smile::sweat_smile: Newbie here… hahahah Either way, thank you a lot. It seems to be working for Advance steel too.

Thank you for your time.

1 Like

You can also check out Add PackagePaths as Parameter of ExecutionSession by mjkkirschner · Pull Request #10836 · DynamoDS/Dynamo · GitHub :slight_smile: It’s another method we added in Dynamo 2.8.

Thank you. I will try it too.

1 Like