TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: d2010 on March 16, 2021, 05:02:45 PM

Title: How to store all comments with best variabile-name?
Post by: d2010 on March 16, 2021, 05:02:45 PM
I have the source lisp bellow. I want, to store all comments inside variabile name
List or String.I need convert OrgSource To NewSource.
Can you replace "myHelp" with other "namevar" from (C#, Java or Clojure)?
I need import   name from other programmming-language.
 :angel:
Code: [Select]
(Defun NewSource(lst / $rr p4 p6 mp dx dy dx2 dy2)
      (setq   p5 (acet-geom-list-extents lst)
                myhelp ";p5 and p6 are the geometry points"
              p6 (cadr p5)
              p5 (car p5)
              p5 (list (car p5) (cadr p5))
              p6 (list (car p6) (cadr p6))
              mp (acet-geom-midpoint p5 p6)           
              myhelp ";prepare to resize the geometry rectang to"
              dx (- (car p2) (car p1))   
             myhelp ";have the same dy/dx ratio as p1 p2."
              dy (- (cadr p2) (cadr p1))
             dx2 (- (car p6) (car p5))
             dy2 (- (cadr p6) (cadr p5))
      );setq
)

Code: [Select]
(Defun OrgSource(lst / $rr p4 p6 mp dx dy dx2 dy2)
      (setq   p5 (acet-geom-list-extents lst)              ;p5 and p6 are the geometry points
              p6 (cadr p5)
              p5 (car p5)
              p5 (list (car p5) (cadr p5))
              p6 (list (car p6) (cadr p6))
              mp (acet-geom-midpoint p5 p6)           ;prepare to resize the geometry rectang to
              dx (- (car p2) (car p1))    ;have the same dy/dx ratio as p1 p2.
              dy (- (cadr p2) (cadr p1))
             dx2 (- (car p6) (car p5))
             dy2 (- (cadr p6) (cadr p5))
      );setq
)
Title: Re: How to store all comments with best variabile-name?
Post by: BIGAL on March 16, 2021, 07:25:13 PM
(setq myhelp (strcat myhelp "\n" ";the new comment"))