Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/15/2020 in all areas

  1. I was recently using a lisp that added up text and created a text string with the sum. It stopped working and quoted the function "mktext" as the problem. It will still add the strings but it will not create a new string. I can't modify the routine, its locked and the owner doesn't work with me anymore. /:D Where can I find a place that would have a lisp that I could read and learn for myself?
    1 point
  2. Depends where you are in the world US is cheaper than AUS. Maybe a I7, min 16gb, nvidia as much as budget permits, a SSD drive and 1tb drive. Mine was like $1600 Aus. My son just paid $2000+ but bought 512gb ssd and 1tb, NVIDIA 2xxx I7 etc wants it for gaming. Dont buy less than 16Gb memory Something like HP Pavilion 15.6-inch15-DK0237TX i7-9750H/16GB/256GB SSD Gaming Laptop $1800 AUS Note Microsoft software may cost you as well. There was a student deal.
    1 point
  3. I am not completely sure that "wannabe accountants" would have any interest in sines and cosines. But I must confess to using Peters Tables. Now THAT was decimal heavy!
    1 point
  4. Do not agreed with you The Earth is so small, take a look on map - just 5-6 thousand of miles or so Here is edited version This will create the new text entity with the same properties as the first selected text has (defun C:STX (/ cpent elist en ip newtxt pt ss sum sumtxt txt) (princ "\n\t\t>>> Select text to get summ >>>") (if ;;select texts/mtexts on screen : (setq ss (ssget '((0 . "*TEXT")))) ;; if selected then : (progn ;; store the first text entity for using 'em further : (setq cpent (ssname ss 0)) ;; set initial sum to zero : (setq sum 0.) ;; loop trough selected texts/mtexts : (while ;; get the first text in selection : (setq en (ssname ss 0)) ;; get entity list of them : (setq elist (entget en)) ;; get the textstring by key 1 from entity list : (setq txt (cdr (assoc 1 elist))) ;; create output string : (setq sumtxt ;; concatenate strings : (strcat ;; convert digits to string : (rtos ;; add to summ the digital value of text : (setq sum (+ (atof txt) sum)) ;; 2 is for metric units (3 for engineering) : 2 ;; set precision by current : (getvar "dimdec"))) ) ;; delete entity from selection set : (ssdel en ss) ) ;; display message in the command line: (princ (strcat "\nSumm=" sumtxt)) (setq pt (getpoint "\nSpecify the new text location: ")) ;; get the insertion point of stored entity : (setq ip (cdr (assoc 10 (entget cpent)))) ;; copy text entity to the new destination point : (command "_copy" cpent "" ip pt) ;; get the last created entity : (setq newtxt (entlast)) ;; get entity list of them : (setq elist (entget newtxt)) ;; modify entity list with new text string : (entmod (subst (cons 1 sumtxt)(assoc 1 elist) elist)) ;; update changes : (entupd newtxt) ) ) (princ) ) (princ "\nStart command with STX...") (princ) ~'J'~
    1 point
  5. Here is a quick example, hope this helps (defun C:STX (/ elist en ss sum sumtxt txt) (princ "\n\t\t>>> Select text to get summ >>>") (if ;;select texts/mtexts on screen : (setq ss (ssget '((0 . "*TEXT")))) ;; if selected then : (progn ;; set initial sum to zero : (setq sum 0.) ;; loop trough selected texts/mtexts : (while ;; get the first text in selection : (setq en (ssname ss 0)) ;; get entity list of them : (setq elist (entget en)) ;; get the textstring by key 1 from entity list : (setq txt (cdr (assoc 1 elist))) ;; create output string : (setq sumtxt ;; concatenate strings : (strcat ;; convert digits to string : (rtos ;; add to summ the digital value of text : (setq sum (+ (atof txt) sum)) ;; 2 is for metric units (3 for engineering) : 2 ;; set precision by current : (getvar "dimdec"))) ) ;; delete entity from selection set : (ssdel en ss) ) ;; display message : (alert (strcat "\nSumm = " sumtxt)) ) ) (princ) ) (princ "\nStart command with STX...") (princ) Sorry for my poor english ~'J'~
    1 point
  6. Hi Mike Take a look at this page, I think it's the best one you could be able to find on the web: http://afralisp.net/ FYI, I've started to learn lisp and VBA from there ~'J'~
    1 point
×
×
  • Create New...