reynaldomalasaga Posted February 20, 2017 Share Posted February 20, 2017 Good day Sir/Maam, Can any one teach me how to modify this code.. i need to select a text in my drawing and that selected text will be added .. please help me!!! :cry::cry::cry: this is the code (defun c:addn ( / ss) (vl-load-com) (if (and (setq ss (ssget "X" (list (cons 0 "*text")))) (setq amt (getreal "\nIsuwat kung pila ang gusto nimo e puno na numero: "))) (progn (mapcar '(lambda (z) (vla-put-textstring z (rtos (+ (atof (vla-get-textstring z)) amt) 2 3))) (mapcar 'vlax-ename->vla-object (vl-remove-if 'listp (mapcar 'cadr (ssnamex ss))))) ) ) (princ) ) Quote Link to comment Share on other sites More sharing options...
BIGAL Posted February 20, 2017 Share Posted February 20, 2017 Something like this text only ;Adds a fixed amount to a number (Alert "TO USE JUST TYPE A2LM") (DEFUN c:A2LM ( / el en a v1 v2 ss) (setvar "cmdecho" 1) (setq olddimzin (getvar "Dimzin")) (setvar "dimzin" 0) (if (not AH:getval) (load "getval")) (ah:getval "Enter ht adjust.." 10 (setq v2 (Atof item)) (setq ss (ssget (list (cons 0 "Text")))) (setq len (sslength ss)) (setq x 0) (repeat len (setq en1 (ssname ss x)) (setq el1 (entget en1)) (setq v1 (atof (cdr (assoc 1 el1)))) (setq a (+ v1 v2)) (setq b (rtos a 2 3)) (setq el (subst (cons 1 b) (assoc 1 el1) el1)) (entmod el) (setq x (+ x 1)) ) ; repeat (setvar "cmdecho" 1) (setvar "dimzin" olddimzin) (princ) ); END DEFUN ;; Input Dialog box with variable title ;; By Ah June 2012 ;; code (ah:getval "LINE 1" 6 5) (defun AH:getval (title width limit / fo) (setq fo (open "C:\\acadtemp\\getval.dcl" "w")) (write-line "ddgetval : dialog {" fo) (write-line " : row {" fo) (write-line ": edit_box {" fo) (write-line (strcat " key = " (chr 34) "key1" (chr 34) ";") fo) (write-line (strcat " label = " (chr 34) title (chr 34) ";" ) fo) (write-line (strcat " edit_width = " (rtos width 2 0) ";" ) fo) (write-line (strcat " edit_limit = " (rtos limit 2 0) ";" ) fo) (write-line " is_enabled = true;" fo) (write-line " }" fo) (write-line " }" fo) (write-line "ok_only;}" fo) (close fo) (setq dcl_id (load_dialog "c:\\acadtemp\\getval")) (if (not (new_dialog "ddgetval" dcl_id)) (exit)) (action_tile "key1" "(setq item $value)(done_dialog)") (mode_tile "key1" 2) (start_dialog) ; returns the value of item ) Quote Link to comment Share on other sites More sharing options...
SLW210 Posted February 20, 2017 Share Posted February 20, 2017 I moved your thread to the AutoLISP, Visual LISP & DCL Forum, please post in the appropriate forum. Please read the Code Posting Guidelines and edit your Code to be included in Code Tags.[NOPARSE] Your Code Here[/NOPARSE] = Your Code Here Quote Link to comment Share on other sites More sharing options...
reynaldomalasaga Posted February 21, 2017 Author Share Posted February 21, 2017 thank u sir .. .. :D... hope u will help me nxt time .. Quote Link to comment Share on other sites More sharing options...
reynaldomalasaga Posted February 21, 2017 Author Share Posted February 21, 2017 SORRY SIR SLW210.. Thank u for reminding me sir.. sorry .. 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.