plecs Posted November 8, 2014 Share Posted November 8, 2014 ((0 0 0 Hz 2.5x20 0 0 0 0 Accesoriu 0) . 56) ((795 757 0 SP_PFL_2 0 0 0 0 101PE Alb Perlat 3) . 1) ((764 100 0 TRAV_2 1 0 0 0 101PE Alb Perlat 18) . 2) like this 0 0 0 Hz 2.5x20 0 0 0 0 Accesoriu 0 56 795 757 0 SP_PFL_2 0 0 0 0 101PE Alb Perlat 3 1 764 100 0 TRAV_2 1 0 0 0 101PE Alb Perlat 18 2 this is rutime but i don t remove parentheses (defun c:exptxt1111 () ;;;--- Get a the data from the blocks (if(setq dataList(getattData)) (progn (setq dataListLength (length dataList)) (setq b (/ dataListLength 10)) (repeat b (listofatt) (setq lst (reverse lst)) (setq mynewdata (append mynewdata (list lst))) (setq lst nil) );end repeat );end progn );end if (setq flist (LM:CountItems mynewdata)) (setq flist (reverse flist)) (setq ssa (length flist)) (setq filename "RaportPAL.txt") (if (setq ofile (open filename "a")) (progn (foreach x flist (write-line (vl-princ-to-string x) ofile)) ;(foreach x flist (write-line x ofile)) (setq ofile (close ofile)) T ) ) (princ) ) (princ) Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted November 8, 2014 Share Posted November 8, 2014 Try the following: (foreach x flist (write-line (substr (setq x (vl-princ-to-string (LM:flatten x))) 2 (- (strlen x) 2)) ofile) ) (setq ofile (close ofile)) The above uses my Flatten function from here. Quote Link to comment Share on other sites More sharing options...
plecs Posted November 11, 2014 Author Share Posted November 11, 2014 works as I want Thank you very much for your help Quote Link to comment Share on other sites More sharing options...
plecs Posted November 11, 2014 Author Share Posted November 11, 2014 I would hardly have figured out how to remove parentheses Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted November 11, 2014 Share Posted November 11, 2014 You're welcome! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.