Author Topic: Help - Create new viewport lisp  (Read 2669 times)

0 Members and 1 Guest are viewing this topic.

ronjonp

  • Needs a day job
  • Posts: 7531
Re: Help - Create new viewport lisp
« Reply #15 on: February 23, 2022, 01:19:18 PM »
I try to do the change  here

Code - Auto/Visual Lisp: [Select]
  1. (defun create_dcl (fn / acadfn)
  2.   (if (null(wcmatch (strcase fn) "*`.DCL"))
  3.     (setq fn (strcat fn ".DCL"))
  4.   )
  5.   (if (not (findfile (strcat (getvar "roamablerootprefix") fn)))
  6.     ;; create dcl file
  7.     (progn
  8.       (setq fn (strcat (getvar "roamablerootprefix") fn)
  9.             fn (open fn "w")
  10.       )
  11.  
  12.  

but is not working. Can any one help me to create the dcl file in  C:\Users\Admin\AppData\Local\Temp

Thanks
Why don't you use your profile? You probably don't have access to the admin profile if you're a limited user ....

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

PM

  • Guest
Re: Help - Create new viewport lisp
« Reply #16 on: February 23, 2022, 01:35:14 PM »
Hi ronjonp. I can not understand your answer!!! I want to use C:\Users\Admin\AppData\Local\Temp because the dcl file is a temp file it is easyer for me to delete it.

ronjonp

  • Needs a day job
  • Posts: 7531
Re: Help - Create new viewport lisp
« Reply #17 on: February 23, 2022, 01:50:32 PM »
Hi ronjonp. I can not understand your answer!!! ...
Chill out...

I'm not sure why you're having problems with this.
Code - Auto/Visual Lisp: [Select]
  1. (defun create_dcl (fn / acadfn)
  2.   (if (null(wcmatch (strcase fn) "*`.DCL"))
  3.     (setq fn (strcat fn ".DCL"))
  4.   )
  5.   (setq path "C:\\Users\\Admin\\AppData\\Local\\Temp\\")
  6.   (if (not (findfile (strcat path fn)))
  7.     ;; create dcl file
  8.     (progn
  9.       (setq fn (strcat path fn)
  10.             fn (open fn "w")
  11.       )

Was your previous username Topographer ?

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

PM

  • Guest
Re: Help - Create new viewport lisp
« Reply #18 on: February 23, 2022, 07:02:41 PM »
Hi ronjonp . I replace the part in the code , run the code without errors but when i write CFL to start the lisp nothing happened .  Any idea?

Thanks

ronjonp

  • Needs a day job
  • Posts: 7531
Re: Help - Create new viewport lisp
« Reply #19 on: February 23, 2022, 07:22:10 PM »
Hi ronjonp . I replace the part in the code , run the code without errors but when i write CFL to start the lisp nothing happened .  Any idea?

Thanks
Sorry I don't know what your problem is. Maybe try using (getenv "temp") as your directory assuming that you login as "ADMIN"

Again, was your previous username Topographer ?

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC