Author Topic: Registry Key For Current profile (cprofile)  (Read 3794 times)

0 Members and 1 Guest are viewing this topic.

NirantarVidyarthee

  • Guest
Registry Key For Current profile (cprofile)
« on: May 30, 2013, 05:39:52 PM »
Which registry Key stores the name of the Current profile ("cprofile")?
I tried following, all reurn 'nil'

(vl-registry-read "HKEY_CURRENT_USER\\Software\\Autodesk\\AutoCAD\R18.1\\ACAD-9005:409\\Profiles")

(vl-registry-read
"HKEY_CURRENT_USER\\Software\\Autodesk\\AutoCAD\R18.1\\ACAD-9005:409\\Profiles\\(default)")

In the registry when I double-click the key, the value is displayed. But I can't access it.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Registry Key For Current profile (cprofile)
« Reply #1 on: May 30, 2013, 06:11:39 PM »
Code: [Select]
(strcat
    "HKEY_CURRENT_USER\\"
    (vlax-product-key)
    "\\Profiles\\"
    (getvar "cprofile")
)
   

Contrived example:

Code: [Select]
(vl-registry-read
    (strcat
        "HKEY_CURRENT_USER\\"
        (vlax-product-key)
        "\\Profiles\\"
        (getvar "cprofile")
    )
    "UserName"   
)

>> "Margaret Atwood"
« Last Edit: May 31, 2013, 10:50:09 AM by MP »
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

Lee Mac

  • Seagull
  • Posts: 12922
  • London, England
Re: Registry Key For Current profile (cprofile)
« Reply #2 on: May 30, 2013, 07:15:22 PM »
Which registry Key stores the name of the Current profile ("cprofile")?

Code: [Select]
(getvar 'cprofile)
Returns the name of the current profile; I don't understand what else you are after.

BlackBox

  • King Gator
  • Posts: 3770
Re: Registry Key For Current profile (cprofile)
« Reply #3 on: May 30, 2013, 07:20:14 PM »
... I don't understand what else you are after.

Note the single backslash in the vl-Registry-Read calls... Which I already pointed out to the OP here.



I really dislike when others' time is wasted, for unnecessarily duplicated threads:

http://forums.augi.com/showthread.php?150015-Registry-Key-For-Current-profile-(cprofile)

http://forums.autodesk.com/t5/Visual-LISP-AutoLISP-and-General/Registry-Key-For-Current-profile-cprofile/td-p/3943041
« Last Edit: May 30, 2013, 07:25:39 PM by BlackBox »
"How we think determines what we do, and what we do determines what we get."