Author Topic: version of acad.pgp as lisp?  (Read 6064 times)

0 Members and 1 Guest are viewing this topic.

chthon

  • Guest
Re: version of acad.pgp as lisp?
« Reply #15 on: February 17, 2018, 10:02:05 PM »
g'day rjp..
wondering what nil does after the defun? as below;
Code: [Select]
;; RJP 2.9.2018 harvest stock PGP and convert to one line lisp list
(defun C:-3DCONFIG nil (command "_.-GRAPHICSCONFIG") (princ))
(defun C:-AR nil (command "_.-ARRAY") (princ))
(defun C:-ARM nil (command "_.-ACTUSERMESSAGE") (princ))
(defun C:-ARS nil (command "_.-ACTSTOP") (princ))
etc - i wasn't able to find any documentation on this, any assistance
appreciated
tia, chthon

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: version of acad.pgp as lisp?
« Reply #16 on: February 18, 2018, 12:09:45 AM »
An empty list is considered nil thus:

(defun c:foo ()  (princ "\nfoo.") (princ))

(defun c:foo nil (princ "\nfoo.") (princ))


are equivalent to the interpreter (but not the eyes).
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

chthon

  • Guest
Re: version of acad.pgp as lisp?
« Reply #17 on: February 21, 2018, 05:03:08 AM »
mp,
makes sense, this is the good thing about code,
thanks,
chthon

ahsattarian

  • Newt
  • Posts: 112
Re: version of acad.pgp as lisp?
« Reply #18 on: February 10, 2021, 05:00:15 AM »
hi all, & thanks for your responses [i like the code snippet from Se7en]
the reason i am interested thus is that as a contractor, these crucial files are networked and locked, often with ambiguous non-standard aliases, guided by these threads;
http://www.cadtutor.net/forum/archive/index.php/t-17625.html
https://gist.github.com/rddim/9c6125f6d518d1598f04bb5081632cd1
https://www.theswamp.org/index.php?topic=40111.0  ...[cheers].
i came up with this lsp version:  [attached]
time to overcome pgp's alias irregularity / regularity - with this pgp.lsp, usual function library is unaffected, & loaded from acad.lsp / accaddoc.lsp.
h-t-h..
~chthon


First and Second Links don't work   !!!!