Getting autodesk account username or email through Dynamo

Is there a way to get the user’s username as displayed in the “account information” window in revit through dynamo?

image

Is there a way to access this value maybe using python node or code block node to get it?

Thankyou

This is the property you are after: Username Property

Most boilerplate Python templates have an app = … line. As such once you set your template to include that all you need to do is set out to app.Username and you are done. There may also be a few custom nodes for this (Archi-Lab comes to mind).

1 Like

@najwan.joan.sv ,

i use


import sys
import clr

clr.AddReference("RevitAPI")
from Autodesk.Revit.DB import *

clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.GeometryConversion)

clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager


doc = DocumentManager.Instance.CurrentDBDocument
uidoc = DocumentManager.Instance.CurrentUIApplication.ActiveUIDocument


# ✅ item
element = UnwrapElement(IN[0])

# 🎯 user
OUT = element.get_Parameter(BuiltInParameter.EDITED_BY).AsValueString()
2 Likes