Solved

Automatically show username

  • 31 January 2023
  • 4 replies
  • 62 views

Badge +1

Hello,

 

I want to show a user name automatically for every person that uses my model, for example when Jim opens he aimms project, I want the model to detect it’s Jim and  save it in parameter and show it in page my question is how can we detect user infos when the model is opened ?  Thank you

icon

Best answer by Marcel Hunting 1 February 2023, 09:54

View original

4 replies

Userlevel 5
Badge +4

Hi @vixingit. On Windows you can use the procedure EnvironmentGetString with the key ‘USERNAME’ to retrieve the user name.

Badge +1

Hi @Marcel Hunting 

Thank you for the reply.

I don’t understand what should I put exactly in the body of the procedure, can you please give me more details please ?

Thank you

Userlevel 5
Badge +4

You can use

EnvironmentGetString( "USERNAME", str );

where ‘str’ is a string parameter in which the user name will be returned.

Badge +1

@Marcel Hunting It worked thank you :D

Reply


Didn't find what you were looking for? Try searching on our documentation pages:

AIMMS Developer & PRO | AIMMS How-To | AIMMS SC Navigator