more values in princ

Discussion in 'AutoCAD' started by kemp, Apr 29, 2004.

  1. kemp

    kemp Guest

    Is there a way to make the text window in autocad show all of the data in
    really large lists using princ? As it is now it cuts off the beginning and
    the end so I can't see if my farmatting is ok.

    Thanks,
    kemp
     
    kemp, Apr 29, 2004
    #1
  2. kemp

    Jeff Mishler Guest

    Something like this?

    (defun princ_list (lst num / count)
    (setq count 0)
    (while (< count (1- (length lst)))
    (princ (nth count lst))
    (princ " ")
    (setq count (1+ count))
    (if (= (rem count num) 0)
    (getstring "\n Press enter to continue .....")
    )
    )
    )

    Useage: (princ_list mylist 100)
    This will print out the list "mylist" and stop every 100 items and ask for
    you to press enter.

    HTH,
    Jeff
     
    Jeff Mishler, Apr 29, 2004
    #2
  3. kemp

    kemp Guest

    That'll do the trick - thanks!

    kemp

     
    kemp, Apr 30, 2004
    #3
  4. kemp

    Mike Weaver Guest

    If you are using 2000 or later, and the list is in a variable, use the vlisp
    IDE (vlide).
    Type the variable name into the Visual LISP Console window, highlight it,
    right-click on it and pick inspect. Select the top item in the resulting
    list, right click on it and pick pretty-print.

    You can now copy and paste the formatted list into a text editor or use it
    any way you like.

    Mike Weaver
     
    Mike Weaver, Apr 30, 2004
    #4
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.