Author Topic: LM:sfsp+ with loginname  (Read 2062 times)

0 Members and 1 Guest are viewing this topic.

lamarn

  • Swamp Rat
  • Posts: 636
LM:sfsp+ with loginname
« on: February 05, 2018, 04:58:36 PM »
Hi all,
I'm trying to make a better install for some tools. 
Can anyone tell me why Lee Mac LM:sfsp+ does not want to work with loginname in the code beneith
Thanks!



Code: [Select]
;Set / check path for Infra AutoCAD Tool

(setq loginname (getvar "loginname"))
(LM:sfsp+ '(strcat "C:\\Users\\" loginname "\\OneDrive - Heijmans N.V\\Infra AutoCAD Tool"))  ; sync folder
(LM:sfsp+ '(strcat "C:\\Users\\" loginname "\\OneDrive - Heijmans N.V\\Infra AutoCAD Tool\\user"))


or ..

Code: [Select]
;Set / check path for Infra AutoCAD Tool

(LM:sfsp+ '(strcat "C:\\Users\\" (getvar "loginname") "\\OneDrive - Heijmans N.V\\Infra AutoCAD Tool"))  ;  synch folder
(LM:sfsp+ '(strcat "C:\\Users\\" (getvar "loginname") "\\OneDrive - Heijmans N.V\\Infra AutoCAD Tool\\user"))

Design is something you should do with both hands. My 2d hand , my 3d hand ..

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: LM:sfsp+ with loginname
« Reply #1 on: February 05, 2018, 05:08:10 PM »
I'm not familiar with LM:sfsp+ but is it expecting a quoted argument to evaluate?
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

Lee Mac

  • Seagull
  • Posts: 12929
  • London, England
Re: LM:sfsp+ with loginname
« Reply #2 on: February 05, 2018, 05:15:04 PM »
My LM:sfsp+ function requires a list of strings, therefore, you should use:

Code - Auto/Visual Lisp: [Select]
  1. (LM:sfsp+
  2.     (list
  3.         (strcat "C:\\Users\\" (getvar "loginname") "\\OneDrive - Heijmans N.V\\Infra AutoCAD Tool")
  4.         (strcat "C:\\Users\\" (getvar "loginname") "\\OneDrive - Heijmans N.V\\Infra AutoCAD Tool\\user")
  5.     )
  6. )

lamarn

  • Swamp Rat
  • Posts: 636
Re: LM:sfsp+ with loginname
« Reply #3 on: February 06, 2018, 12:14:16 AM »
Thank you, Lee !
Design is something you should do with both hands. My 2d hand , my 3d hand ..

ronjonp

  • Needs a day job
  • Posts: 7533
Re: LM:sfsp+ with loginname
« Reply #4 on: February 06, 2018, 09:53:39 AM »
FWIW .. (getenv "userprofile") = (strcat "C:\\Users\\" (getenv "username"))
Code - Auto/Visual Lisp: [Select]
  1. (lm:sfsp+
  2.   (list (strcat (getenv "userprofile") "\\OneDrive - Heijmans N.V\\Infra AutoCAD Tool")
  3.         (strcat (getenv "userprofile") "\\OneDrive - Heijmans N.V\\Infra AutoCAD Tool\\user")
  4.   )
  5. )

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC