Jump to content

Recommended Posts

Posted

Hi all,

 

Is it possible to check the mailadress that the user used to sign into the application?

I managed to collect it from Outlook, but thats nog 100% trustworthy.

 

Cannot find anything about this subject on the webs.

 

Thanks in advance!

Posted

Not directly but you can easily get their username with (getenv "USERNAME").

For most offices the rest of their email addresses are the same and could easily be added on.

I use it in code to both add the users name to a drawing and to add a link to open their network folder.

  • Like 1
Posted

Hi Tombu,

 

My users have 7 different email extentions, 7 companies in 1 holding.

I would like to set certain variables based on there extention.

 

I could ask to give there extention on first login, but you'd say the login mailadress should be accessable...

 

Posted
2 minutes ago, tombu said:

Not directly but you can easily get their username with (getenv "USERNAME").

For most offices the rest of their email addresses are the same and could easily be added on.

I use it in code to both add the users name to a drawing and to add a link to open their network folder.

 

Also to link to someones documents folder

 

(strcat (getenv "userprofile") "\\Documents\\")

 

  • Like 1
Posted

I'm guessing this is for a user license?

 

 

Posted

Hi,

 

Its for a script that imports company logo's into the DWG based on the 'users company.

I got it running with the Outlook check, but when Outlook is offline, its not working. :D

Posted

Ah i use where the file is saved for that.

 

(if (wcmatch (getvar 'DWGPREFIX) "*Client*")
  (vl-cmdf "_.Insert" (strcat (getenv "userprofile") "\\LOGO\\client_LOGO.dxf") pause "" "" "")

 

Posted (edited)
55 minutes ago, Aftertouch said:

Hi Tombu,

 

My users have 7 different email extentions, 7 companies in 1 holding.

I would like to set certain variables based on there extention.

 

I could ask to give there extention on first login, but you'd say the login mailadress should be accessable...

 

I use the attached lisp to set the Author in a drawings property to the name they prefer derived from their "USERNAME" assigned in Windows using the macro ^C^C^P(load "Author.lsp")(Author).

 

You could modify it to derive the email associated from their "USERNAME" if you know all their usernames and email addresses.

 

Author.lsp

Edited by tombu
  • Like 1
Posted

.,, If you know all the user names and email addresses..... which might mean a lot of updating in a company with staff changes?

 

If I am reading this right then if Outlook is running you can get the current users e-mail address? Working off line and you can't? The e-mail domain indicates the company the user works for and so the data to put into the drawing.

 

Using Tombus idea of a database of user names, I think this could be created dynamically, little user interaction. If and when the user is working in CAD, and is online with outlook could you copy their e-mail address to a separate text file, create a bit of a database that way. Each time a users opens up CAD, check their details in the text file, if not there check outlook, if outlook isn't online give them a pop-up to ask, then write those details to the text file? Saved centrally for all users or locally for a single user in the windows temps folder or somewhere,

 

Might be you could include name (from Wndows user name), their e-mail, the company they work for, and perhaps a last checked (for tidying up the database depends how big it gets, delete anyone who hasn't signed in within 18 months (allowing for maternity leave you see))

  • Like 1
Posted

I just did something similar and just have a list of company names that appears in a list box so select client, it then pops a new box with that clients title block options like A1, A1-por,A3 etc then asks how many and makes all the new layouts with that client title block. All the title blocks are in one master dwg so just use layout to select from a dwg.

  • Like 1
Posted

Hi all, thanks for the sugestions.

For now, ill stick to the Outlook version i have. I dont want to keep a database of any sort. way to much people for that.

If Outlook is offline, it'll prompt them to use a picklist themself. Quick and dirty fix.

 

unbeleavable it is so had to access the logged in user mailadress lol.

Posted
5 hours ago, Aftertouch said:

unbeleavable it is so had to access the logged in user mailadress lol.

 

You are wanting 1 program to talk to another program, both do very different things and are made by different companies... not that unbelievable really....

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...