- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I want to set a variable ($SupportDir) that is called from a bunch of other lisps using vl-propogate. I want that variable to be conditional for when a user has synced with ACC the first time (we are rolling it out to the company shortly) or if they are on the VPN or using a local. This is in the acad.lsp and I input the $dir# above this block. Can someone please sanity-check this? Thanks!
(setq $Dir1 "ACC\Dir") ; this one does not exist for this example
(setq $Dir2 "VPN\Dir"); this one does exist
(setq $Dir3 "Local\Dir"); this one exists but we want dir2 to be used because of preference like the user is connected to the VPN
(setq $SupportDir
(cond
(vl-file-directory-p $Dir1 $Dir1)
(vl-file-directory-p $Dir2 $Dir2)
(vl-file-directory-p $Dir3 $Dir3)
(t (princ "Couldn't set Support directory-p"))
(princ $SupportDir)
)
)
my expectation is that $Dir2 will be set as the $SupportDir which is used throughout the ACAD session.
Solved! Go to Solution.