Author Topic: Can a Lisp Routine delete a profile?  (Read 3363 times)

0 Members and 1 Guest are viewing this topic.

caddcop

  • Guest
Can a Lisp Routine delete a profile?
« 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:
  • Check for a file on the network
  • If found, swich the users profile temporarily to some default profile.
  • Once in that profile, delete the original profile
  • One that profile was deleted, re-import the arg file for the deleted profile
  • Switch the use to the newly recreated profile
  • Delete the file that it found in step 1.
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

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: Can a Lisp Routine delete a profile?
« Reply #1 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]


butzers09silverado

  • Guest
Re: Can a Lisp Routine delete a profile?
« Reply #2 on: March 08, 2012, 08:33:13 AM »
that is a SUPER HANDY bit of info right there.

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: Can a Lisp Routine delete a profile?
« Reply #3 on: March 08, 2012, 08:34:36 AM »
Just make sure it isn't the current profile.
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: Can a Lisp Routine delete a profile?
« Reply #4 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

dgorsman

  • Water Moccasin
  • Posts: 2437
Re: Can a Lisp Routine delete a profile?
« Reply #5 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.
If you are going to fly by the seat of your pants, expect friction burns.

try {GreatPower;}
   catch (notResponsible)
      {NextTime(PlanAhead);}
   finally
      {MasterBasics;}

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: Can a Lisp Routine delete a profile?
« Reply #6 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?
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

BlackBox

  • King Gator
  • Posts: 3770
Re: Can a Lisp Routine delete a profile?
« Reply #7 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

Manage what needs managing, and leave the users to do what they do. Lemon Squeezy.
"How we think determines what we do, and what we do determines what we get."

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: Can a Lisp Routine delete a profile?
« Reply #8 on: March 08, 2012, 11:14:31 AM »
Mark kind of reminds me of Jeff Bridges...
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

BlackBox

  • King Gator
  • Posts: 3770
Re: Can a Lisp Routine delete a profile?
« Reply #9 on: March 08, 2012, 11:16:08 AM »
Mark kind of reminds me of Jeff Bridges...



Wrong thread much?  :-D

Edit - I bet he's a fan of Tron, now that you mention it though. LoL
"How we think determines what we do, and what we do determines what we get."

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: Can a Lisp Routine delete a profile?
« Reply #10 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.
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox