TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: MWorland on April 16, 2012, 05:03:38 PM

Title: Change enterprise cui on startup
Post by: MWorland on April 16, 2012, 05:03:38 PM
Currently we run a setup where our files are on the network and occasionally our guys travel. I'm looking for a way to have AutoCAD check on start-up if the network drive is available and if not load a local version of our files. Our structure is as follows:
Main CUI               C:\User.cuix
Enterprise CUI      N:\Company.cuix
  Partial                  N:\Acad.cuix
                               N:\Company.mnl
Our mnl file loads all of our other files and sets our Support Paths to the correct location. Since our mnl loads last it doesn't do any good if AutoCAD cant find a network version of the enterprise cuix.

Im stuck on the logic on where to place the code that will switch the path to local if our network drive is not found. We do not use any acad*.lsp files, and would rather not create a mnl file for the user.cuix file. I have thought about creating a desktop shortcut for loading the local enterprise, but I would rather have a seamless change to the user.

Does anyone have a process they currently use.

Thanks,
matt
Title: Re: Change enterprise cui on startup
Post by: dgorsman on April 16, 2012, 05:06:08 PM
Have you considered using Offline Files?  Saves a lot of headaches.  If you use mapped drives which are set-up at log-in/start-up you may need a local BAT or other script to create dummy mapping but otherwise it works quite well here.
Title: Re: Change enterprise cui on startup
Post by: MWorland on April 16, 2012, 05:10:33 PM
We almost went that route, but Im not sure why we didnt. I will investigate further if it is something that is working well for others.

Thanks
Title: Re: Change enterprise cui on startup
Post by: Chris on April 17, 2012, 07:50:14 AM
for our laptops, we've got a startup bat file that will map local folders to match our company network folders. when the laptop is connected to our network it updates any files that have changed.
Title: Re: Change enterprise cui on startup
Post by: BlackBox on April 17, 2012, 03:46:45 PM
Being on a laptop myself, I've tried Batch files to Subst local folders as drives, and Offline Files. The latter is better IMO, and requires less Admin/setup time than using Batch. My only complaint was that while files may be updated when you next access the network, while online, a sync is not performed automagically when any file(s) are changed... I still had to manually initiate the sync, before I could pack up and hit the road.  :|
Title: Re: Change enterprise cui on startup
Post by: danallen on April 17, 2012, 04:47:31 PM
I think you can configure offline files to sync when you logoff or shutdown, try that instead of just unplugging?
Title: Re: Change enterprise cui on startup
Post by: dgorsman on April 17, 2012, 04:47:42 PM
Being on a laptop myself, I've tried Batch files to Subst local folders as drives, and Offline Files. The latter is better IMO, and requires less Admin/setup time than using Batch. My only complaint was that while files may be updated when you next access the network, while online, a sync is not performed automagically when any file(s) are changed... I still had to manually initiate the sync, before I could pack up and hit the road.  :|

I've got the flags set for syncing at both log-on and log-off so it gets the users whether they are coming or going.
Title: Re: Change enterprise cui on startup
Post by: BlackBox on April 17, 2012, 06:48:39 PM
I typically work to the point of closing up to head out, so I just toggle Offline Files, and put the laptop to sleep. I'm not sure which flags you're referring to... I may or may not have rights to that anyway, per corporate IT.
Title: Re: Change enterprise cui on startup
Post by: irneb on April 18, 2012, 02:38:47 AM
It's a setting on your laptop ... so you probably should have access. Although M$ had a brain fart again and decided to omit this setting in Vista / Win7. It's now "supposed" to be standard.

http://blogs.technet.com/b/netro/archive/2010/04/09/how-the-synchronization-in-windows-7-offline-files-works.aspx
Title: Re: Change enterprise cui on startup
Post by: Chris on April 18, 2012, 08:33:10 AM
my backup of network files to the laptop is setup in our network startup batch file.  It reads the computer name, and if the name matches the laptop, it automagically xcopies new/updated files to the laptops. as well as while it is connected to the network, setting our mapped drives so that the user is working with the real settings.  Only downside is, if something goes away, it doesnt delete it on the laptop.
Title: Re: Change enterprise cui on startup
Post by: BlackBox on April 18, 2012, 09:09:52 AM
It's a setting on your laptop ... so you probably should have access. Although M$ had a brain fart again and decided to omit this setting in Vista / Win7. It's now "supposed" to be standard.

http://blogs.technet.com/b/netro/archive/2010/04/09/how-the-synchronization-in-windows-7-offline-files-works.aspx

Thanks for the link, boet (http://en.wikipedia.org/wiki/List_of_South_African_slang_words). I'll give that a read after work. :mrgreen:

It reads the computer name, and if the name matches the laptop, it automagically xcopies new/updated files to the laptops.

 :lmao:  I'm glad this word is gathering some popularity!
Title: Re: Change enterprise cui on startup
Post by: dgorsman on April 18, 2012, 10:20:17 AM
my backup of network files to the laptop is setup in our network startup batch file.  It reads the computer name, and if the name matches the laptop, it automagically xcopies new/updated files to the laptops. as well as while it is connected to the network, setting our mapped drives so that the user is working with the real settings.  Only downside is, if something goes away, it doesnt delete it on the laptop.

We used to do that, but our users are pretty hard on the laptops.  Users have broken several in the past couple of years so we kept needing to remove old laptops from the list and adding new ones - PROVIDED I was actually told we had a new laptop.
Title: Re: Change enterprise cui on startup
Post by: irneb on April 18, 2012, 10:25:25 AM
Thanks for the link, boet (http://en.wikipedia.org/wiki/List_of_South_African_slang_words). I'll give that a read after work. :mrgreen:
It's a pleasure Bru. Hope it helps.
Title: Re: Change enterprise cui on startup
Post by: Chris on April 18, 2012, 10:47:16 AM
We used to do that, but our users are pretty hard on the laptops.  Users have broken several in the past couple of years so we kept needing to remove old laptops from the list and adding new ones - PROVIDED I was actually told we had a new laptop.
I think you can use wildcards in the computer name match, so as long as IT would follow a standard naming format (different for laptops and desktops), one could in theory not need to add new laptops to the list.

I'm only dealing with 2 laptops here, so it isnt an issue.
Title: Re: Change enterprise cui on startup
Post by: BlackBox on April 18, 2012, 04:00:14 PM
For us, ComputerName = UserName, with exception to those of us on laptops, then ComputerName = Username-LT... Throw in a little Wcmatch, or a dash of vl-String-Search, and done. Lemon squeezy.  :kewl: