Author Topic: Anyway to check AutodeskID with lisp  (Read 1071 times)

0 Members and 1 Guest are viewing this topic.

kruuger

  • Swamp Rat
  • Posts: 637
Anyway to check AutodeskID with lisp
« on: April 02, 2024, 11:29:59 AM »
Hello,
Is there any way to check AutodeskID for logged in user?
We can check if user is on serial or subscription with (getvar "_pkser").
But if subscription, than what login?
Thanks

d2010

  • Bull Frog
  • Posts: 326
Re: Anyway to check AutodeskID with lisp
« Reply #1 on: April 02, 2024, 12:37:43 PM »
You can check. current username, windows7 or 8.
(Getenv "USERNAME") inside autolisp..

For better, and you must be ensure, what you need , then you check. many variabile-names
Code: [Select]
"USERDOMAIN=yuri-PC121hdd25
USERNAME=yuri
USERPROFILE=D:\Users\yuri
LOCALAPPDATA=D:\Users\yuri\AppData\Local
LOGONSERVER=\\YURI-PC121HDD25
NUMBER_OF_PROCESSORS=4
Eg.1 you (and (getenv "USERNAME")  (getenv "LOGONSERVER"))


Lonnie

  • Newt
  • Posts: 177
Re: Anyway to check AutodeskID with lisp
« Reply #2 on: April 02, 2024, 01:52:43 PM »
in 2025 there is an
onlineusername

Displays the Autodesk account name of the user whose currently logged into this product.

If no one is currently logged in, the value returned is an empty string.

kruuger

  • Swamp Rat
  • Posts: 637
Re: Anyway to check AutodeskID with lisp
« Reply #3 on: April 02, 2024, 05:49:23 PM »
in 2025 there is an
onlineusername

Displays the Autodesk account name of the user whose currently logged into this product.

If no one is currently logged in, the value returned is an empty string.
probably that's what i need but for 2024 and older :(

kruuger

  • Swamp Rat
  • Posts: 637
Re: Anyway to check AutodeskID with lisp
« Reply #4 on: April 02, 2024, 05:51:16 PM »
You can check. current username, windows7 or 8.
(Getenv "USERNAME") inside autolisp..

For better, and you must be ensure, what you need , then you check. many variabile-names
Code: [Select]
"USERDOMAIN=yuri-PC121hdd25
USERNAME=yuri
USERPROFILE=D:\Users\yuri
LOCALAPPDATA=D:\Users\yuri\AppData\Local
LOGONSERVER=\\YURI-PC121HDD25
NUMBER_OF_PROCESSORS=4
Eg.1 you (and (getenv "USERNAME")  (getenv "LOGONSERVER"))
yes, but i think none of these older variable return autodeskID.

CodeDing

  • Newt
  • Posts: 51
Re: Anyway to check AutodeskID with lisp
« Reply #5 on: April 02, 2024, 06:28:47 PM »
in 2025 there is an
onlineusername

Displays the Autodesk account name of the user whose currently logged into this product.

If no one is currently logged in, the value returned is an empty string.
probably that's what i need but for 2024 and older :(

That System Variable has been around for a long time now. Should work in your autocad also:
Code - Auto/Visual Lisp: [Select]
  1. (getvar 'ONLINEUSERNAME)
~DD
Senior CAD Tech & AI Specialist
Need AutoLisp help?
Try my custom GPT 'AutoLISP Ace'

Lonnie

  • Newt
  • Posts: 177
Re: Anyway to check AutodeskID with lisp
« Reply #6 on: April 02, 2024, 06:47:02 PM »
in 2025 there is an
onlineusername

Displays the Autodesk account name of the user whose currently logged into this product.

If no one is currently logged in, the value returned is an empty string.
probably that's what i need but for 2024 and older :(

That System Variable has been around for a long time now. Should work in your autocad also:
Code - Auto/Visual Lisp: [Select]
  1. (getvar 'ONLINEUSERNAME)

beat me. I'm going from 2021 to 2025
There are 52 new variables I am going over right now.

These are the defaults
Code: [Select]
_ACTIVITYINSIGHTSPATH C:\Users\lshaw\AppData\Local\Autodesk\ActivityInsights\Common
_ACTIVITYINSIGHTSSTATE 0
_ACTIVITYINSIGHTSSUPPORT 3
_ACTIVITYINSIGHTSVIEWEDLOGGING 0
_ANNOSCALEZOOM 0
_AUTOPLACEMENT 1
_BGCOREPUBLISH 1
_BLOCKCREATEMODE 0
_BLOCKEXCLUDECOLOR 7
_BLOCKINCLUDECOLOR 3
_BLOCKSDATACOLLECTION 1
_BLOCKSYNCFOLDER "C:\Users\lshaw\AppData\Roaming\Autodesk\AutoCAD 2025\R25.0\enu\"
_BLOCKTARGETCOLOR 3
_CENTERLTYPE
_CLOUDCOLLABMODIFIEDOPTION 0
_COMMENTHIGHLIGHT 1
_COUNTCHECK 2
_COUNTCOLOR 3
_COUNTERRORCOLOR 1
_COUNTSERVICE 1
_DISPSILHBLOCKS 1
_DX12FRAMERATEUNLIMITED 0
_ENABLEDSTLOCK 0
_ENABLESYNCPDF 1
_FASTSHADEDMODE 0
_HPDRAWMODE 0
_HPPATHALIGNMENT 1
_HPPATHWIDTH 0.2500
_JIGZOOMMAX 0
_JIGZOOMMIN 0
_MACROINSIGHTSSUPPORT 1
_MACRONOTIFY 1
_MARKUPASSISTMODE 1
_MARKUPPAPERDISPLAY 1
_MARKUPPAPERTRANSPARENCY 90
_MARKUPSELECTIONMODE 1
_MTEXTEDENCODING 0
_PASTESPECMODE 0
_PLACEMENTSWITCH 1
_REVCLOUDAPPROXARCLEN 0.0000
_REVCLOUDMAXARCLENGTH 0.5000
_REVCLOUDMINARCLENGTH 0.5000
_SHOWNEWSTATE 0
_SSMDETECTMODE 1
_STYLUSFORCETHRESHOLD 2
_SYSFLOATING 0
_TRACEFADECTL 40
_TRACEOSNAP 0
_TRACEVPSUPPORT 1
_VIEWBACKSTATUS 0
_VIEWFWDSTATUS 0
_WBLOCKCREATEMODE 1

BIGAL

  • Swamp Rat
  • Posts: 1417
  • 40 + years of using Autocad
Re: Anyway to check AutodeskID with lisp
« Reply #7 on: April 02, 2024, 07:25:24 PM »
Like Kruger subscription returned a serial number using _pkser like 000-0000000. I am sure there will be somewhere in the registry an ID. Any ideas.
A man who never made a mistake never made anything

kruuger

  • Swamp Rat
  • Posts: 637
Re: Anyway to check AutodeskID with lisp
« Reply #8 on: April 03, 2024, 02:23:40 AM »
in 2025 there is an
onlineusername

Displays the Autodesk account name of the user whose currently logged into this product.

If no one is currently logged in, the value returned is an empty string.
probably that's what i need but for 2024 and older :(

That System Variable has been around for a long time now. Should work in your autocad also:
Code - Auto/Visual Lisp: [Select]
  1. (getvar 'ONLINEUSERNAME)
WOW! Really ?!
Thanks

kdub_nz

  • Mesozoic keyThumper
  • SuperMod
  • Water Moccasin
  • Posts: 2140
  • class keyThumper<T>:ILazy<T>
Re: Anyway to check AutodeskID with lisp
« Reply #9 on: April 03, 2024, 03:05:06 AM »
Well, I've learnt something new today . . .
I can go to bed now :-)

Called Kerry in my other life
Retired; but they dragged me back in !

I live at UTC + 13.00

---
some people complain about loading the dishwasher.
Sometimes the question is more important than the answer.

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8722
  • AKA Daniel
Re: Anyway to check AutodeskID with lisp
« Reply #10 on: April 03, 2024, 03:18:44 AM »
This is documented in the entitlement API... I think

57gmc

  • Bull Frog
  • Posts: 366
Re: Anyway to check AutodeskID with lisp
« Reply #11 on: April 03, 2024, 01:06:12 PM »
This is documented in the entitlement API... I think
I was going to suggest the entitlement api, but it's documented in Help.
« Last Edit: April 05, 2024, 03:48:21 PM by 57gmc »

d2010

  • Bull Frog
  • Posts: 326
Re: Anyway to check AutodeskID with lisp
« Reply #12 on: April 05, 2024, 10:42:00 AM »
My trick, you must use many-variabiles (minim 7..10variabiles) , in that way, 
  you customize very-power , you customize the user-name and user-autoCAdID.
You upgrade the (getvar "AutoCadID") with
   (checkallEqu (list (getvar "AutoCadID")  (getenv "USERNAME") (getvar "_PKSER")
               (getenv "LOGONSERVER")  (getvar "ONLINEUSERNAME") (getvar "ACADVER")
               (wcmatch *2025* (getvar "_BLOCKSYNCFOLDER"))
   ))
 :idea:
You can check. current username, windows7 or 8.
(Getenv "USERNAME") inside autolisp..
yes, but i think none of these older variable return autodeskID.
« Last Edit: April 05, 2024, 12:04:00 PM by JohnK »

57gmc

  • Bull Frog
  • Posts: 366
Re: Anyway to check AutodeskID with lisp
« Reply #13 on: April 05, 2024, 03:43:37 PM »
My trick, you must use many-variabiles (minim 7..10variabiles) , in that way, 
  you customize very-power , you customize the user-name and user-autoCAdID.
You upgrade the (getvar "AutoCadID") with
   (checkallEqu (list (getvar "AutoCadID")  (getenv "USERNAME") (getvar "_PKSER")
               (getenv "LOGONSERVER")  (getvar "ONLINEUSERNAME") (getvar "ACADVER")
               (wcmatch *2025* (getvar "_BLOCKSYNCFOLDER"))
   ))
 :idea:
You can check. current username, windows7 or 8.
(Getenv "USERNAME") inside autolisp..
yes, but i think none of these older variable return autodeskID.

ONLINEUSERNAME returns the public profile name of the Autodesk account you use for your subscription.
« Last Edit: April 05, 2024, 04:28:12 PM by 57gmc »

kruuger

  • Swamp Rat
  • Posts: 637
Re: Anyway to check AutodeskID with lisp
« Reply #14 on: April 08, 2024, 04:53:01 AM »
My trick, you must use many-variabiles (minim 7..10variabiles) , in that way, 
  you customize very-power , you customize the user-name and user-autoCAdID.
You upgrade the (getvar "AutoCadID") with
   (checkallEqu (list (getvar "AutoCadID")  (getenv "USERNAME") (getvar "_PKSER")
               (getenv "LOGONSERVER")  (getvar "ONLINEUSERNAME") (getvar "ACADVER")
               (wcmatch *2025* (getvar "_BLOCKSYNCFOLDER"))
   ))
 :idea:
You can check. current username, windows7 or 8.
(Getenv "USERNAME") inside autolisp..
yes, but i think none of these older variable return autodeskID.

ONLINEUSERNAME returns the public profile name of the Autodesk account you use for your subscription.
Yes, as CodeDing mentioned earlier. Variable works well. All good,
Thanks