Author Topic: Loading a lisp command ...  (Read 2032 times)

0 Members and 1 Guest are viewing this topic.

Hangman

  • Swamp Rat
  • Posts: 566
Loading a lisp command ...
« on: February 26, 2010, 02:25:25 PM »
Good afternoon everybody.
I am curious, mainly because I am having a bit of an issue with loading a routine but I can't get it to run.
So, I have a routine like this:
Code: [Select]
(defun c:offsets () (command ".offset" "l" "s") (princ))In my PGP file, I have set the command as this:
Quote
RSR      *OFFSETS

I have run this before in 2008, so I don't understand why it isn't working here in my new 2010.  Unless there's something I setup in the 2008 that I am overlooking now, or something has changed in the new version.
So when I type 'rsr' at the command line, I get:
Quote
Unknown command "RSR"

Any help would be appreciated.
Thanks.
Hangman  8)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Drafting Board, Mechanical Arm, KOH-I-NOOR 0.7mm
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

M-dub

  • Guest
Re: Loading a lisp command ...
« Reply #1 on: February 26, 2010, 02:30:07 PM »
Might be a stupid question, but did you reinit your pgp file?

Hangman

  • Swamp Rat
  • Posts: 566
Re: Loading a lisp command ...
« Reply #2 on: February 26, 2010, 02:41:58 PM »
Might be a stupid question, but did you reinit your pgp file?

Well, ... umm ... no.
But I am assuming it gets reinit ialized every time autocad starts, or every time I reboot and start autocad.
Am I mistaken ??
Hangman  8)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Drafting Board, Mechanical Arm, KOH-I-NOOR 0.7mm
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

M-dub

  • Guest
Re: Loading a lisp command ...
« Reply #3 on: February 26, 2010, 02:44:51 PM »
Might be a stupid question, but did you reinit your pgp file?
I am assuming it gets reinit ialized every time autocad starts, or every time I reboot and start autocad.
Am I mistaken ??

Nope, you're right.  Sorry, I was assuming you had JUST made the change to your pgp file.

M-dub

  • Guest
Re: Loading a lisp command ...
« Reply #4 on: February 26, 2010, 02:46:59 PM »
What about adding that routine to your startup suite?

VovKa

  • Water Moccasin
  • Posts: 1631
  • Ukraine
Re: Loading a lisp command ...
« Reply #5 on: February 26, 2010, 02:51:41 PM »
i think comma is missing
Code: [Select]
RSR,      *OFFSETS

Hangman

  • Swamp Rat
  • Posts: 566
Re: Loading a lisp command ...
« Reply #6 on: February 26, 2010, 02:55:14 PM »
Might be a stupid question, but did you reinit your pgp file?
I am assuming it gets reinit ialized every time autocad starts, or every time I reboot and start autocad.
Am I mistaken ??

Nope, you're right.  Sorry, I was assuming you had JUST made the change to your pgp file.

Ahhhhaaaaa !!!
You learn something new every day.
So, the PGP file doesn't work with comments like the LiSP routines do.  If you comment something after the callout, it won't recognize it.
Quote
RSR,   *OFFSETC         ; (LiSP - Offset to Current)
The PGP won't recognize this line.
But it will recognize these two lines:
Quote
RSR,   *OFFSETC
; (LiSP - Offset to Current)
Interesting.
Hangman  8)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Drafting Board, Mechanical Arm, KOH-I-NOOR 0.7mm
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~