Something like THIS one?
Registered forum members do not see this ad.
Can anyone please help. We are looking for a LISP routine that will list the dimensions of lines of the selection to a simple list that we can import into excel. My knowledge of LISP is not quite as advanced as zero, but I know this can be done and it would save me hours.
Anyone, please……………
fuccaro, you are a giant amongst men. That's superb - in fact all we need is the length. The start,end, centres etc are superfluous but we can just delete those columns in the spreadsheet.
Thanks again!
... or adjust the lisp code to export only what you need.Originally Posted by kitewader
It's nice to be nice, but sometimes is nicer to be evil!.
![]()
Tip: Please do not PM or email me with CAD questions - use the forums, you'll get an answer sooner.
Easy for you to say, as a complete novice in LISP it's easier to delete the excel data. I did try to alter the code but just got nowhere.
Thanks for your help and suggestions again.
Of course, if you were bored one day and wanted something to do.........
Code:;| Program to export line lengths into a CSV file mfuccaro@hotmail.com ---------------------------June 2005 |; (defun c:LL2F( / name file ss ssi enl) (setq name (getvar "dwgname") file (open (getfiled "Output file..." name "CSV" 1) "w") ss (ssget) ssi -1) (if ss (progn (repeat (sslength ss) (setq enl (entget (ssname ss (setq ssi (1+ ssi))))) (if (= "LINE" (cdr (assoc 0 enl))) (write-line (rtos (distance (cdr (assoc 10 enl)) (cdr (assoc 11 enl)))) file))))) (close file) (princ) )
It's nice to be nice, but sometimes is nicer to be evil!.
![]()
Tip: Please do not PM or email me with CAD questions - use the forums, you'll get an answer sooner.
Thanks for that. When I try to load it it gives an error command of:
; error: bad character read (octal): 0
Is it operator error (me) of a glitch in the code??
I gived it a quick try and it worked for me. Please try again and return here with a new message. I will see tomorrow what can I do.
It's nice to be nice, but sometimes is nicer to be evil!.
![]()
Tip: Please do not PM or email me with CAD questions - use the forums, you'll get an answer sooner.
Hi,
No, still getting the same error.
Here’s what I’ve done.
Pasted the code into wordpad, saved it as ll2f.lsp
I get a “ll2f.lsp successfully loaded message” in the Load/Unload Applications Dialogue Box.
The command line then shows:
Command: _appload ll2f.lsp successfully loaded.
Command: ; error: bad character read (octal): 0
If I enter “ll2f” in the command line it gives:
Unknown command "LL2F". Press F1 for help.
The other (lst.lsp) LISP loads and runs fine.
I appreciate your help.
Registered forum members do not see this ad.
Well, this time I am out of ideas. Maybe try to use Notepad instead of Wordpad![]()
It's nice to be nice, but sometimes is nicer to be evil!.
![]()
Tip: Please do not PM or email me with CAD questions - use the forums, you'll get an answer sooner.
Bookmarks