Hi all,
I have a lisp to import page setup form specific template like this:
(setq expert (getvar "EXPERT"))(setvar "EXPERT" 2) (setvar "dimasz" 0.1)
(command "_.-PSETUPIN" "C:/Users/Asus/Dropbox/Soft Refs/Civil 3D/1c3d.dwt" "*")
(setvar "expert" expert))
The problem is we are using dropbox so the first part "X:/Users/Asus/..." different from each user. How should I modify the Lisp to find 1c3d.dwt automatically from different setup.
Thanks in advanced for your help.
Mike
Solved! Go to Solution.
Solved by Ajilal.Vijayan. Go to Solution.
use the LOGINNAME variable to find the user name and build the file path from that value
(setq usr (getvar "loginname")) (setq fname (strcat "C:/Users/" usr "/Dropbox/Soft Refs/Civil 3D/1c3d.dwt"))
(command "_.-PSETUPIN" fname "*")
FWIW -
If you'd like to then set your newly imported Page Setup as 'current' for each Layout, this plug-in may be of use:
(foreach layoutname (layoutlist) (vla-SetActivePageSetup layoutname “YourPageSetupName”) )
Cheers
"How we think determines what we do, and what we do determines what we get."