How to get User Info in VB
How to get User Info in VB
(OP)
Hello
I would like to get the user name that is filled in [Tools/Options/User Info/Name:] in a VB macro.
Do you know what is the command that do this?
I've tried Application.username, but it returns the Windows username. I need the Sollid Edge username.
Thankyou if you can help me!
Bye
I would like to get the user name that is filled in [Tools/Options/User Info/Name:] in a VB macro.
Do you know what is the command that do this?
I've tried Application.username, but it returns the Windows username. I need the Sollid Edge username.
Thankyou if you can help me!
Bye





RE: How to get User Info in VB
I discovered that this informations are saved in the Windows Registry, so I`m getting this key value with Visual Basic functions.
This solution has a problem, because I`ve to describe the SE version in the key address (Version 17), and it would not run in new verions. So I created a string with the funcion objapp.version, extracting the version string, and it works fine.
By the way, if anyone has a better solution, please tell us.
Thanks
RE: How to get User Info in VB
to get the Version the simple way you can use this
Dim sVers as String
sVers = Left(objSeApp.Version, 2)
dy
RE: How to get User Info in VB
Oops! Gears not shifted in properly you already described
how to get the version -- read operation failed
No, I don't think there is a better solution, sometimes
you have to go via the Windows API to obatin som information
because it's only stored there and SE has no direkt method
to retrieve.
dy