Jump to content

Leaderboard

Popular Content

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

  1. So... you got the insertion point, rotation, and text... where all you need is the text. Why would you need to gather all the other data? Plus, you only set your results in the "new_coords" variable, you didn't actually modified the entity itself. You should look at the entmod or vla-put-TextString function. Also, have a look at the assoc function, it will save you lots of trouble and lines. Below should achieve what you want: (defun c:EH2000korg ( / 1_1 const ent set_1 text1) (setq const (cond ((getreal "\nSpecify constant to add <0.23>: ")) (0.23))) (if (setq set_1 (ssget "x" '((0 . "TEXT") (7 . "ITALIC") (8 . "korgus-EH2000")))) (repeat (setq 1_1 (sslength set_1)) (setq ent (ssname set_1 (setq 1_1 (1- 1_1))) text1 (cdr (assoc 1 (entget ent))) ) (entmod (subst (cons 1 (strcat " " (rtos (+ const (atof text1)) 2 2))) (assoc 1 (entget ent)) (entget ent) ) ) ) ) (princ) )
    2 points
  2. The following should present a far more reliable method across multiple systems: (defun LM:findfontfile ( fnt / dir ) (if (setq dir (LM:specialfolder "fonts")) (progn (eval (list 'defun 'LM:findfontfile '( fnt ) (list 'findfile (list 'strcat (vl-string-right-trim "\\" (vl-string-translate "/" "\\" dir) ) "\\" 'fnt ) ) ) ) (LM:findfontfile fnt) ) ) ) ;; Special Folder - Lee Mac ;; Queries the WshSpecialFolders collection for the specified folder ;; Ref: http://msdn.microsoft.com/en-us/library/9x9e7edx%28v=vs.85%29.aspx (defun LM:specialfolder ( fld / rtn spf wsh ) (if (setq wsh (vlax-get-or-create-object "wscript.shell")) (progn (setq rtn (vl-catch-all-apply '(lambda ( ) (setq spf (vlax-get-property wsh 'specialfolders)) (vlax-invoke-method spf 'item fld) ) ) ) (if spf (vlax-release-object spf)) (vlax-release-object wsh) (if (not (vl-catch-all-error-p rtn)) rtn) ) ) ) (vl-load-com) (princ) _$ (LM:findfontfile "arial.ttf") "C:\\Windows\\Fonts\\arial.ttf"
    1 point
  3. I don't understand how that code can work PATH /= "PATH". Graphic to help you understand:
    1 point
  4. You should post a sample drawing. If the ends are touching THIS may work for you.
    1 point
  5. can't licence lisplink any more but think I still can show you the screen you want :
    1 point
×
×
  • Create New...