Search the Community
Showing results for tags 'syntax'.
-
Hi all, I'm a casual basic lisper. Where in the code is wrong. I'm getting the ss with ssget. I want some error trapping to tell the users that nothing is selected. LISP selects all text regardless of layer. But this error I can't fix. I've tried looking at some examples but I can't get any to work. This works when objects are selected: (defun c:SEL_TEXT_ALL () (setq ss nil) (setq ss (ssget '((0 . "MTEXT,TEXT")))) (if (> (sslength ss) 0) (progn (command "Pselect" ss "") (princ (strcat "\nNumber of found Text objects : < " (itoa (sslength ss)) " >")) (setq ss nil) (princ) ) (princ (strcat "\n*** Nothing Selected ***")) ) ) Error I get when nothing selected: Select objects: ; error: bad argument type: lselsetp nil EDIT: Is it good practice to clear the selection set before the progn is run?
-
New to AUtoLISP, trying to insert a block and rotate it
GigaFHLS posted a topic in AutoLISP, Visual LISP & DCL
Hello, I'm very new to Autolisp, and I am having some trouble with my code. Here's a description of what I am trying to do: I have a drawing consisting of two pipes, bottom pipe and upper pipe. They will be inclined in reference to the paper, represented by the square. I need to insert at the end of these pipes a block (inside the block will be a leader), which then will be rotated to align itself with the paper orientation. Somehow, the code i've written so far is not working, I believe it's because i'm not getting the correct syntax of the commands i'm using. Would anyone be willing to take a look? Help is much appreciated. See attached files for my code and the drawing (containg the desired block) ttten.LSP Drawing1.dwg- 3 replies
-
- lisp
- help wanted
-
(and 1 more)
Tagged with:
-
Had some fun with a recent sub, resulted in these two programs Autoloader This program will generate autoload expressions for all LISP files in a selected directory, proceeding to write such expressions to a text file output (from which the user may copy the contents to an ACADDOC.lsp or destination of their choice). GetSyntax A fun one - sparked from this thread, involving a question regarding how to determine the command to use to call a program when there is no indication in the code header and no loading messages indicating such information. This program will read a selected LISP file and print a report detailing the command syntax for all defined commands in the selected file. Both programs use my GetSyntax sub, which reads a supplied LISP file and returns a list of defined commands within the supplied file. Enjoy! Lee