We recently installed 2005. I set the users profile at the startup like this: C:\ADT2005\acad.exe /ld "C:\Program Files\Common Files\Autodesk Shared\AecBase45.dbx" /p "c:\adt2005\gglo\profiles\standard.arg" We now have a new profile that needs to be imported and set to current for all of our users. I tried using the /p with the new profile as above that does not work. I have also tied some LISP functions but no luck so far. What is the best way to automate this? I am thinking this must be a common need in larger firms. Thank you.
You may find these helpful: (defun putActiveProfile (profilename); JUST "name" (vla-put-activeprofile (vla-get-profiles (vla-get-preferences (vlax-get-acad-object))) profilename ) ); function (defun getAllProfileNames (/ allprofiles) (vla-getallprofilenames (vla-get-profiles (vla-get-preferences (vlax-get-acad-object))) 'allprofiles ) (vlax-safearray->list allprofiles) ); function (defun existProfile (profilename) (not (not (member (strcase profilename) (mapcar '(lambda (x) (strcase x)) (getallprofilenames)) ))) ); function ; (exportProfile "profilename" "C:\\TEMP\\profilename.arg") ; if path is omitted profile is saved in active directory ; overwrites argname if it exists ; return T if profile is exported (defun exportProfile (profilename argname) (if (existProfile profilename) (not (vla-exportprofile (vla-get-profiles (vla-get-preferences (vlax-get-acad-object))) profilename argname )) ) ); function ; (importProfile "profilename" "C:\\TEMP\\profilename.arg" 1) ; overwrites profilename if it exists ; if path is omitted profile is imported from active directory ; inclpathinfo=1 The path information in the registry file will be preserved. ; inclpathinfo=0 The path information in the registry file will not be preserved. ; return T if profile is imported (defun importProfile (profilename argname inclpathinfo) (not (vla-importprofile (vla-get-profiles (vla-get-preferences (vlax-get-acad-object))) profilename argname inclpathinfo )) ); function
C:\ADT2005\acad.exe /ld "C:\Program Files\Common Files\Autodesk Shared\AecBase45.dbx" /p "c:\adt2005\gglo\profiles\standard.arg" all of our users. I tried using the /p with the new profile as above that does not work. I have also tied some LISP functions but no luck so far. What is the best way to automate this? I am thinking this must be a common need in larger firms. are you certain there are not two "/p" in the target box, I've thrown the "/p" in without eleminating the standard autocad /p that comes with the Icon. Have you created a new shortcut Icon and attempted it again. **I've had problems with the typical Icon autocad installs on the desktop.** I've created a CADD folder on the C drive of my users computers that is shared and has a temp folder, menu folder and project folder in it. I put the arg file in there and make the "Start In" folder the "C:/cadd" folder where the *.arg file is. Then I copy the folder and shortcut from computer to computer. ps. I also have the automatic save to the temp folder, and I put there menu in the menu folder. Personal configuration is saved only on there computer.
Thanks Bob. I have worked with similar functions but no luck so far. Unfortunately, we do not have a CAD Manager and this task falls to me. I am not experienced in LISP, although I have figured out acaddoc.lsp to load our neccessary routines. I have created acad.lsp and tried several functions for example, someone told me this would work: (defun Update_Profle () (vla-importprofile (vla-get-profiles (vla-get-preferences (vlax-get-acad-object))) "Standard" (strcat "C:\\ADT2005\\Profiles\\" "Standard" ".arg") 1) (vla-put-activeprofile (vla-get-profiles (vla-get-preferences (vlax-get-acad-object))) "Standard") ) ;;end defun But it does not. I copy the new profile down to the users local directory, and then I believe I just need the right combination of LISP for the acad.lsp, but my knowledge falls a bit short of just which of the LISP fucntions I need to use. Thanks
What is interesting, is that when I first deployed, the /p switch worked fine to set the profile for the first time. But now that it has been set, it alwasy goes back to the original one, effectively ignoring the new shortcut /p I created. Even when I go into Options and import and set current a new profile, it reverts back to the old one at next start up. Must be a registry key or something? I know I am just missing a small piece of the overall picture here.
Remove from acad.lsp, make this little modification, and paste into acaddoc.lsp..... (defun Update_Profle () (vl-load-com); Add this line...... (vla-importprofile (vla-get-profiles (vla-get-preferences (vlax-get-acad-object))) "Standard" (strcat "C:\\ADT2005\\Profiles\\" "Standard" ".arg") 1) (vla-put-activeprofile (vla-get-profiles (vla-get-preferences (vlax-get-acad-object))) "Standard") ) ;;end defun Should fire up then. Bob
Bob, should this return any results to the text window? I can see my other acaddoc.lsp routines being loaded and a couple commands, but I do not see anythig for this profile function. It is also not changing the profile. I tried putting it at the beginning and at the end of acaddoc.lsp
If you want it to 'fire-up' each drawing..add the following line just after the function.. (Update_Profle) That will 'call' the function .....and run it. Bob