Solved! Go to Solution.
Solved by moogalm. Go to Solution.
(setq acadlocation (vl-registry-read (strcat "HKEY_LOCAL_MACHINE\\" (vlax-product-key)) "ACADLOCATION") )
For me Returns:
"C:\\Program Files\\Autodesk\\AutoCAD 2019"
This matches :
Command: (findfile "ACAD.exe") "C:\\Program Files\\Autodesk\\AutoCAD 2019\\ACAD.exe"
Hope this helps
Regards,
// Called Kerry in my other life.
Everything will work just as you expect it to, unless your expectations are incorrect.
Sometimes the question is more important than the answer.
class keyThumper<T> : Lazy<T>; another Swamper
@kdub_nz gave two lisp variants to fetch you ACAD install dir.
If this is what you want in >NET
Either of these options work
return (string)rk.GetValue("AcadLocation");
OR
return (string)rk.GetValue("Location");
The shorter parameter was added for AutoCAD 2000 or AutoCAD 2002 if memory serves.
The code posted by Gilles should work well for your requirements without AutoCAD running.
I'm not sure of the value held by 'CurVer'. Check to ensure if works as expected if the last version run is not the latest installed.
madhukar may be able to assist with that query.
Regards,
// Called Kerry in my other life.
Everything will work just as you expect it to, unless your expectations are incorrect.
Sometimes the question is more important than the answer.
class keyThumper<T> : Lazy<T>; another Swamper
I have just checked the value of 'CurVer' after opening differing builds of AutoCAD.
The value held represents the Version of the most recent build opened, NOT the version of the latest install.
I'd be interested in knowing the value held immediately after a new install, before that build is run.
I'd guess that the value would be the version of the last build opened.
Regards,
// Called Kerry in my other life.
Everything will work just as you expect it to, unless your expectations are incorrect.
Sometimes the question is more important than the answer.
class keyThumper<T> : Lazy<T>; another Swamper
Can't find what you're looking for? Ask the community or share your knowledge.