TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: caddcop on March 05, 2012, 07:23:11 AM

Title: Can a Lisp Routine delete a profile?
Post by: caddcop on March 05, 2012, 07:23:11 AM
I've been thinking about how we setup our network and this idea popped into my head.
If you load AutoCAD using a profile, it only loads the profile if it does not already exist.
So then I thought, could I create a routine that would run a lisp program on the initial load that does the following:
This would allow a network administrator to update any users profile as needed.
So, my question is, "Can a Lisp Routine delete a user profile?"
TIA
Title: Re: Can a Lisp Routine delete a profile?
Post by: Lee Mac on March 05, 2012, 07:50:34 AM
So, my question is, "Can a Lisp Routine delete a user profile?"

I haven't attempted to do so, but after a quick browse of the documentation, the PreferencesProfiles Object does have a DeleteProfile method, so I would be inclined to say yes.

Here is how to access the PreferencesProfiles Object:

Code - Auto/Visual Lisp: [Select]

Title: Re: Can a Lisp Routine delete a profile?
Post by: butzers09silverado on March 08, 2012, 08:33:13 AM
that is a SUPER HANDY bit of info right there.
Title: Re: Can a Lisp Routine delete a profile?
Post by: alanjt on March 08, 2012, 08:34:36 AM
Just make sure it isn't the current profile.
Title: Re: Can a Lisp Routine delete a profile?
Post by: Lee Mac on March 08, 2012, 09:27:52 AM
that is a SUPER HANDY bit of info right there.

'twas written in haste, but glad it serves some purpose  :-)

Thanks
Title: Re: Can a Lisp Routine delete a profile?
Post by: dgorsman on March 08, 2012, 10:59:41 AM
Seems a little roundabout.  Also kills any user changes made to profile-stored settings (not everything needs to be managed).  Might be more productive to look into using LISP to manage those settings which need managing and leave the rest alone.
Title: Re: Can a Lisp Routine delete a profile?
Post by: alanjt on March 08, 2012, 11:02:46 AM
Wouldn't an enterprise cui(x) and setting certain system variables in the acaddoc.lsp accomplish the same thing?
Title: Re: Can a Lisp Routine delete a profile?
Post by: BlackBox on March 08, 2012, 11:07:36 AM
Seems a little roundabout.  Also kills any user changes made to profile-stored settings (not everything needs to be managed).  Might be more productive to look into using LISP to manage those settings which need managing and leave the rest alone.

I've been using this for a couple years, and am very happy with how simple, and effective it has been for our group:

http://rkmcswain.blogspot.com/2007/02/setting-support-paths-via-lisp.html (http://rkmcswain.blogspot.com/2007/02/setting-support-paths-via-lisp.html)

Manage what needs managing, and leave the users to do what they do. Lemon Squeezy.
Title: Re: Can a Lisp Routine delete a profile?
Post by: alanjt on March 08, 2012, 11:14:31 AM
Mark kind of reminds me of Jeff Bridges...
Title: Re: Can a Lisp Routine delete a profile?
Post by: BlackBox on March 08, 2012, 11:16:08 AM
Mark kind of reminds me of Jeff Bridges...

(http://www.theswamp.org/index.php?action=dlattach;topic=41120.0;attach=22038;image)

Wrong thread much?  :-D

Edit - I bet he's a fan of Tron, now that you mention it though. LoL
Title: Re: Can a Lisp Routine delete a profile?
Post by: alanjt on March 08, 2012, 11:17:22 AM
Mark kind of reminds me of Jeff Bridges...



Wrong thread much?  :-D
Based on email notification from this thread is close enough for me.