hidxb123 Posted October 25, 2016 Share Posted October 25, 2016 Hi friends Can you pls provide me a lips for following 1) rename my Drawing no from 001-5020 to MUP-001-5050 2) rename my drawing no MUP-001-5050 To 001-5050 in first lips just add MUP- In second just replace MUP- Thanks Quote Link to comment Share on other sites More sharing options...
mostafa badran Posted October 25, 2016 Share Posted October 25, 2016 Did you mean rename the title or rename the file ? Quote Link to comment Share on other sites More sharing options...
hidxb123 Posted October 25, 2016 Author Share Posted October 25, 2016 Thanks mostafa i mean the rename the text within in the drawing only.. rename the text with MUP- Did you mean rename the title or rename the file ? Quote Link to comment Share on other sites More sharing options...
mostafa badran Posted October 25, 2016 Share Posted October 25, 2016 Thanks mostafa i mean the rename the text within in the drawing only.. rename the text with MUP- What about find and replace? Quote Link to comment Share on other sites More sharing options...
hidxb123 Posted October 25, 2016 Author Share Posted October 25, 2016 i wish to done this by lips, bz i have to repeat this every drawing Quote Link to comment Share on other sites More sharing options...
mostafa badran Posted October 25, 2016 Share Posted October 25, 2016 i wish to done this by lips, bz i have to repeat this every drawing This helpful for you.:) http://www.lee-mac.com/bfind.html Quote Link to comment Share on other sites More sharing options...
hidxb123 Posted October 25, 2016 Author Share Posted October 25, 2016 Thank you there is any lips , when i click on the text and it will automatically rename in to by adding "mup"+ current text Quote Link to comment Share on other sites More sharing options...
Roy_043 Posted October 25, 2016 Share Posted October 25, 2016 (defun c:SwitchTxt ( / enm obj str) (if (and (setq enm (car (nentsel))) (setq obj (vlax-ename->vla-object enm)) (vlax-property-available-p obj 'textstring) ) (vla-put-textstring obj (if (wcmatch (strcase (setq str (vla-get-textstring obj))) "MUP-*") (substr str 5) (strcat "MUP-" str) ) ) ) (princ) ) Quote Link to comment Share on other sites More sharing options...
mostafa badran Posted October 25, 2016 Share Posted October 25, 2016 Thank youthere is any lips , when i click on the text and it will automatically rename in to by adding "mup"+ current text Ok try this. (defun C:addmup ( / END ENT I SSET TXT) (setq sset (ssget '((0 . "*TEXT")))) (setq i (sslength sset)) (while (not (minusp (setq i (1- i)))) (setq ent (ssname sset i) end (entget ent) txt (cdr (assoc 1 end)) end (subst(cons 1(if (strcat txt )(strcat "MUP-" txt))) (assoc 1 end) end)) (entmod end) ) (princ) ) Quote Link to comment Share on other sites More sharing options...
hidxb123 Posted October 25, 2016 Author Share Posted October 25, 2016 Excellent :D:D it works how you learn this lips , i am using many lips, but all of them got contributed good people like you when i will learn to make some lips Quote Link to comment Share on other sites More sharing options...
hidxb123 Posted October 25, 2016 Author Share Posted October 25, 2016 Ok try this.(defun C:addmup ( / END ENT I SSET TXT) (setq sset (ssget '((0 . "*TEXT")))) (setq i (sslength sset)) (while (not (minusp (setq i (1- i)))) (setq ent (ssname sset i) end (entget ent) txt (cdr (assoc 1 end)) end (subst(cons 1(if (strcat txt )(strcat "MUP-" txt))) (assoc 1 end) end)) (entmod end) ) (princ) ) Excellent :D:D it works how you learn this lips , i am using many lips, but all of them got contributed good people like you when i will learn to make some lips Quote Link to comment Share on other sites More sharing options...
hidxb123 Posted October 25, 2016 Author Share Posted October 25, 2016 Thank you roy , its working fine with me now, thank for your good heart Quote Link to comment Share on other sites More sharing options...
BIGAL Posted October 26, 2016 Share Posted October 26, 2016 Copy "001-500" to clipboard using Ctrl+C , FIND Ctrl+V in Replace MUP then Ctrl V replace ALL no need for code. Its an alternative method. 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.