I would like to get the machine’s macAddress or something similar that was unique to that machine, I’m not an expert in Dynamo BIM, REVIT or C# but via code I managed to get the computer’s mac address, but Dynamo runs in sandbox (correct me if I’m wrong ), I can’t access this information, I would like to create a file that I can search the machine for when I make a request or even obtain unique information from the computer, does anyone have a guide to point me to or know if this is really possible?
If you have code to access the max address in a Dynamo integration, then it should be accessible via Dynamo sandbox as well. Can you share the code you created and how it fails when it isn’t working?
Use a Python node.
Rhythm does some of this (in sandbox too). The code is here.
I can add a node for macaddress right now, if that would help:
If you’re after any unique information I’d just use the environment. This works in Dynamo in Revit. Dunno about the sandbox.
import System
from System import Environment
Name = Environment.UserName
Machine = Environment.MachineName
OUT = Name, Machine
In regular Python you use
import os
import subprocess
import platform
print(os.getlogin())
print( platform.node())
And in Dynamo os.environ or something similar gives you something… Apologies if I’ve totally misunderstood… It’s late and I’ve had wine
I will add that on a machine you could have multiple mac addresses depending on how the system is connected(EG wifi or Ethernet for example).
This could also change if say the user switches from being in a meeting room therefore connected via wifi, to then going back to there seat which is wired.
Yeah, this is why I think a static user ID would be better… such as the autodesk user id, which is accessible in pretty much any Dynamo instance since about 2.16 (so 3/4 of supported sandbox versions), and all instances of Dynamo for Revit and Dynamo for Civil 3D.
Sorry, but that solution is kinda gross.
If you were really serious you could start to mimic what licensing software does by checking serial numbers of hard disks or stuff like that that does not change.
I like the hard disc solution, but 99% of the time it’s not about “which CPU”, but “who”, and the HDD doesn’t track different log ins / userIDs.
Perhaps a different user case though.