nil in prompt

nil in prompt

lambertb
Collaborator Collaborator
1,989 Views
3 Replies
Message 1 of 4

nil in prompt

lambertb
Collaborator
Collaborator

I am trying to make a simple lsp to process a couple key in entrys. The macro works but I get an extra input line in my command prompt with the text nil. It doesn't seem to be affecting anything but I am wondering if it is possible to make the lsp better so that I don't get this line. If I enter the commands without a lsp, I don't get the nil line.

 

Offset with layer by source

 

 (defun c:QS ()
 (command "._offset" "l" "s")
 )

 

Thanks.

C3D 2022 and 2024
0 Likes
Accepted solutions (1)
1,990 Views
3 Replies
Replies (3)
Message 2 of 4

regisrohde
Advocate
Advocate
Accepted solution
(defun c:QS ()
(command "._offset" "l" "s")
(princ)
)
Please mark this as the solution if it resolves your issue.Kudos gladly accepted.
Regis Rohde
0 Likes
Message 3 of 4

Kent1Cooper
Consultant
Consultant

@Anonymous wrote:
(defun c:QS ()
(command "._offset" "l" "s")
(princ)
)

For a little bit more explanation of why that's the solution, see this [among others -- this question comes up pretty regularly around here].

Kent Cooper, AIA
Message 4 of 4

lambertb
Collaborator
Collaborator

Thanks. I now know the story behind (princ)

C3D 2022 and 2024
0 Likes