Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Change Revit User Name

5 REPLIES 5
Reply
Message 1 of 6
Moustafa_K
1398 Views, 5 Replies

Change Revit User Name

Is there an access to change the username of the document via API?


-----------------------------------------------------
Moustafa Khalil
5 REPLIES 5
Message 2 of 6
Dale.Bartlett
in reply to: Moustafa_K

My understnding is that this property is read only.

From SDK help:

BasicFileInfo..::..Username Property 
BasicFileInfo Class 
Returns the username.
Namespace: Autodesk.Revit.DB
C#
public string Username { get; }




______________
Yes, I'm Satoshi.
Message 3 of 6

Which leads me to my next question:

How to return the Revit Username?

<code>

BasicFileInfo bfi = new BasicFileInfo();

return bfi.Username;

</code>

Is not correct: "no constructors defined"

Thanks, Dale




______________
Yes, I'm Satoshi.
Message 4 of 6
Revitalizer
in reply to: Dale.Bartlett

UIApplication.Application.Username




Rudolf Honke
Software Developer
Mensch und Maschine





Message 5 of 6
arnostlobel
in reply to: Dale.Bartlett

Hello Dale,

It looks like the only method to get an instance of BasicFileInfo is static BasicFileInfo.Extract. Please note it does not work with an open document. It takes a path of a file on disk.

I do agree the documentation for the needs BasicFileInfo class to be improved. I have created a task for the responsible development team to update the documentation. Thank you for bringing this problem to our attention.
Arnošt Löbel
Message 6 of 6

Hi Autodesk,

 

Please enable setting the Application.Username property in a future release.

 

Thanks

Harry

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community