I want to do some loggings and I need the Dynamo script file name. I know there is some Python code for Revit. But I need it to work for Civil 3D.
Thanks.
I want to do some loggings and I need the Dynamo script file name. I know there is some Python code for Revit. But I need it to work for Civil 3D.
Thanks.
I am actually working on the same thing right now haha. Here you go:
import clr
clr.AddReference('AcDynamo')
from Autodesk.AutoCAD.DynamoApp import *
# Gets Dynamo instance so the active script can be recorded
def GetGraphNameCivil3D():
AcDynamoRuntime.Initialize()
DynamoModel = AcDynamoRuntime.DynamoModel
DynamoWorkspace = DynamoModel.CurrentWorkspace
return DynamoWorkspace.FileName
#Define Output (OUT)
OUT = GetGraphNameCivil3D()
Hey Joël,
Thanks a lot!
I am curious how you figgered it out.
We are using this Dynamo script name with other parameters for logging purposes.
Kind regards, Edward
Haha, a lot of peeking in the Civil dll’s and experience with the Dynamo API
Thanks for your effort @Joelmick
Finally got this function implemented innovera enviroment.
Thanks again