Visual LISP, AutoLISP and General Customization

Visual LISP, AutoLISP and General Customization

Reply
Member
thierry.huisman
Posts: 5
Registered: ‎02-29-2012
Message 1 of 3 (187 Views)

Set variable depending on location folder (find directory)

187 Views, 2 Replies
09-20-2012 07:54 AM

We have user folders on severall servers, now I want the user menu's to be stored on the network so their home folder depends on what server it's located on. I tried using the vl-file-directory-p command but it doesn't seem to work.

Even worse, as soon as the userfolder is found I want to let the script check for a file called user.cuix in the Acad folder and if it doesn't excists copy it from another location to that folder (if possible).

This is what I got so far:

 

(setq UserName (getvar "loginname"))
(setq RootZW "\\\\users\\zw\\")
(setq RootVL "\\\\users\\vl\\")

(setq Company "\\\\CADConf\\ACAD13\\")

 

(if (vl-file-directory-p (strcat RootZW UserName))
 (progn
  (setq AcadMap (strcat RootZW UserName "\\acad\\")
 )
)
(if (vl-file-directory-p (strcat RootVL UserName))
 (progn
  (setq AcadMap (strcat RootVL UserName "\\acad\\")
 )
)

 

(setenv "MenuFile" (strcat AcadMap "user.cuix"))

 

 

Next to this we have 4 other options as well, but to keep it short I left it at the first 2.

Valued Mentor
martti.halminen
Posts: 317
Registered: ‎12-31-2009
Message 2 of 3 (159 Views)

Re: Set variable depending on location folder (find directory)

09-21-2012 12:00 AM in reply to: thierry.huisman

Are you quite sure about your paths?

Seems to me you have RootVL and RootZW both pointing to the same server.

 

--

Member
thierry.huisman
Posts: 5
Registered: ‎02-29-2012
Message 3 of 3 (156 Views)

Re: Set variable depending on location folder (find directory)

09-21-2012 12:34 AM in reply to: martti.halminen

Difference is in the folder (one is ZW other is VL). We also have an entirely different server as well

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community