<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Text Swap using a slash (/) in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/text-swap-using-a-slash/m-p/8068352#M103973</link>
    <description>&lt;P&gt;Depends on how you look at it I guess.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The RegEx code is something which I wrote a long time ago and is part of my personal and companies library with (sub)functions. So I didn't write it for this purpose and I'm just re-using some of my old but already existing code.&lt;/P&gt;&lt;P&gt;And this RegEx function is way more powerful than then writing specific LISP code to just do one task only and can be used for possible future text handling as well.&lt;/P&gt;</description>
    <pubDate>Thu, 14 Jun 2018 13:57:47 GMT</pubDate>
    <dc:creator>DannyNL</dc:creator>
    <dc:date>2018-06-14T13:57:47Z</dc:date>
    <item>
      <title>Text Swap using a slash (/)</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/text-swap-using-a-slash/m-p/8048506#M103967</link>
      <description>&lt;P&gt;I'm looking for a text swap lsp or command that uses a slash (/) to separate the sides. For example:&lt;/P&gt;&lt;P&gt;I have this wire marker:&lt;/P&gt;&lt;P&gt;TB-PCS-3-1/SCSSV-HPA-JOA-C1&lt;/P&gt;&lt;P&gt;and I want to copy it with the text "flip flopped" to look like this:&lt;/P&gt;&lt;P&gt;SCSSV-HPA-JOA-C1/TB-PCS-3-1&lt;/P&gt;&lt;P&gt;We have a wiremarker program that does this within the program but I can't find anything for Autocad. I have several columns of this and I have to change the numbering scheme. Rather than do it multiple times, I'd like to do it once, copy the whole column, then "flip flop" the numbers.&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;Thank you in advance!&lt;BR /&gt;Veronica&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2018 18:41:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/text-swap-using-a-slash/m-p/8048506#M103967</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-06-05T18:41:51Z</dc:date>
    </item>
    <item>
      <title>Re: Text Swap using a slash (/)</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/text-swap-using-a-slash/m-p/8067522#M103968</link>
      <description>&lt;P&gt;@Anonymous&amp;nbsp;wrote:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;I'm looking for a text swap lsp or command that uses a slash (/) to separate the sides. For example:&lt;/P&gt;&lt;P&gt;I have this wire marker:&lt;/P&gt;&lt;P&gt;TB-PCS-3-1/SCSSV-HPA-JOA-C1&lt;/P&gt;&lt;P&gt;and I want to copy it with the text "flip flopped" to look like this:&lt;/P&gt;&lt;P&gt;SCSSV-HPA-JOA-C1/TB-PCS-3-1&lt;/P&gt;&lt;P&gt;We have a wiremarker program that does this within the program but I can't find anything for Autocad. I have several columns of this and I have to change the numbering scheme. Rather than do it multiple times, I'd like to do it once, copy the whole column, then "flip flop" the numbers.&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;Thank you in advance!&lt;BR /&gt;Veronica&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;The "flip flopping" is easy. Locate the / within the string, substring until that position = first part. Substring from / is last part. strcat them together in reverse order.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But what kind of entity are we speaking about? Text, Mtext, Attribute???&lt;/P&gt;&lt;P&gt;&amp;amp; what's with the "i want to copy it ..." do you mean the original should stay? (and a copy is reversed?)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;edit:&lt;/P&gt;&lt;P&gt;This will do the swaping:&lt;/P&gt;&lt;PRE&gt;Command: (defun c:flipflop ( fliptxt / pos flip flop)
(_&amp;gt;    (setq pos (vl-string-position (ascii "/") fliptxt)
((_&amp;gt;          flip (substr fliptxt 1 pos)
((_&amp;gt;          flop (substr fliptxt (+ 2 pos))
((_&amp;gt;          fliptxt (strcat flop "/" flip)
((_&amp;gt;    )
(_&amp;gt;    fliptxt
(_&amp;gt; )
C:FLIPFLOP

Command: (setq fliptxt (c:flipflop "TB-PCS-3-1/SCSSV-HPA-JOA-C1"))
"SCSSV-HPA-JOA-C1/TB-PCS-3-1"&lt;/PRE&gt;</description>
      <pubDate>Thu, 14 Jun 2018 07:57:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/text-swap-using-a-slash/m-p/8067522#M103968</guid>
      <dc:creator>roland.r71</dc:creator>
      <dc:date>2018-06-14T07:57:31Z</dc:date>
    </item>
    <item>
      <title>Betreff: Text Swap using a slash (/)</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/text-swap-using-a-slash/m-p/8067642#M103969</link>
      <description>&lt;P&gt;@Anonymous&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Without issue/error handling and not nice, but my interpretation of your goal.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(defun c:CopySwapCol (/ ss1 ss2 bp string)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (and&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (setq ss1 (ssget '((1 . "*/*")(8 . "*")))) ; &amp;lt;- Use [F1] for "WCMATCH" about 1.Textvalue or 8.Layername pattern creation.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (setq ss2 (ssadd))&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (setq bp (getpoint "\nCopy basepoint: "))&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (foreach obj (vl-remove-if 'listp (mapcar 'cadr (ssnamex ss1)))&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; (setq string (cdr(assoc 1 (entget obj))))&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; (ssadd (entmakex (subst&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (cons 1 (strcat (substr string (+ 2 (vl-string-search "/" string)))&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "/"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (substr string 1 (vl-string-search "/" string))&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (cons 1 string)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (entget obj)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ss2&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; )&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (command "_.MOVE" ss2 "" "_non" bp)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;BR /&gt;&amp;nbsp;(princ)&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4682962"&gt;@roland.r71&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;defun c: in its most beautiful form with an argument, today creative or is there more behind it?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 08:28:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/text-swap-using-a-slash/m-p/8067642#M103969</guid>
      <dc:creator>cadffm</dc:creator>
      <dc:date>2018-06-14T08:28:33Z</dc:date>
    </item>
    <item>
      <title>Betreff: Text Swap using a slash (/)</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/text-swap-using-a-slash/m-p/8067690#M103970</link>
      <description>&lt;P&gt;Since it is unclear where the text is coming from, i simply limited my code to do the text swap. Regardless of it's origin.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This can easily be expanded by code that gets it from a selected (m)text, or block attribute.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;edit:&lt;/P&gt;&lt;P&gt;...So in the end it would become a local function, without the c:&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 09:18:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/text-swap-using-a-slash/m-p/8067690#M103970</guid>
      <dc:creator>roland.r71</dc:creator>
      <dc:date>2018-06-14T09:18:21Z</dc:date>
    </item>
    <item>
      <title>Re: Text Swap using a slash (/)</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/text-swap-using-a-slash/m-p/8067771#M103971</link>
      <description>&lt;P&gt;And this is my solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A different approach by utilizing regular expressions to find the / and group the text before and after the found /.&lt;/P&gt;&lt;P&gt;Uses my library function RegEx which is more divers and extended than what's only necessarily for this text swap.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(defun c:Test (/ T_Selection T_Text T_TextSwap)
   (if
      (setq T_Selection (ssget '((0 . "TEXT"))))
      (progn         
         (foreach T_Text (vl-remove-if '(lambda (T_Item) (listp (cadr T_item))) (ssnamex T_Selection))
            (if
               (setq T_TextSwap (RegEx "\(.*\)/(.*\)" (vla-get-TextString (setq T_Text (vlax-ename-&amp;gt;vla-object (cadr T_Text)))) :vlax-false :vlax-false :vlax-false :vlax-true "$2/$1"))
               (vla-put-TextString T_Text T_TextSwap)
            )
         )
      )
   )
   (princ)
)

(defun RegEx (RE_Pattern RE_SearchString RE_GlobalMode RE_IgnoreCaseMode RE_SubMatchMode RE_SearchReplaceMode RE_ReplaceString / RE_RegExObject RE_Count RE_Result RE_Return)
   (if
      (and
         (= (type RE_SearchString)      'STR)
         (= (type RE_Pattern)           'STR)
         (/= RE_Pattern                   "")
         (/= RE_SearchString              "")
         (= (type RE_GlobalMode)        'SYM)
         (= (type RE_IgnoreCaseMode)    'SYM)
         (= (type RE_SubMatchMode)      'SYM)
         (= (type RE_SearchReplaceMode) 'SYM)
         (or
            (= RE_SearchReplaceMode :vlax-false)
            (and
               (= RE_SearchReplaceMode :vlax-true)
               (= (type RE_ReplaceString) 'STR)
            )
         )
      )
      (progn
         (setq RE_RegExObject (vlax-get-or-create-object "VBScript.RegExp"))
         (vlax-put-property RE_RegExObject 'Pattern     RE_Pattern)
         (vlax-put-property RE_RegExObject 'Global      RE_GlobalMode)
         (vlax-put-property RE_RegExObject 'IgnoreCase  RE_IgnoreCaseMode)
         (cond
            (
               (= RE_SearchReplaceMode :vlax-false)
               (setq RE_Result (vl-catch-all-apply 'vlax-invoke-method (list RE_RegExObject 'Execute RE_SearchString)))
               (if
                  (and
                     (not (vl-catch-all-error-p RE_Result))
                     (&amp;gt; (vla-get-Count RE_Result) 0)
                     (setq RE_Count -1)
                  )
                  (if
                     (and
                        (= RE_SubMatchMode :vlax-true)
                        (&amp;gt; (vla-get-Count (setq RE_SubMatches (vlax-get-property (vlax-get-property RE_Result 'Item 0) 'SubMatches))) 0)
                     )
                     (progn
                        (repeat (vla-get-Count RE_SubMatches)
                           (setq RE_Return (append RE_Return (list (vlax-variant-value (vlax-get-property RE_SubMatches 'Item (setq RE_Count (1+ RE_Count)))))))
                        )
                     )
                     (progn
                        (repeat (vla-get-Count RE_Result)
                           (setq RE_Return (append RE_Return (list (vla-get-Value (vlax-get-property RE_Result 'Item (setq RE_Count (1+ RE_Count)))))))
                        )
                     )
                  )
               )
            )
            (
               RE_SearchReplaceMode
               (setq RE_Result (vl-catch-all-apply 'vlax-invoke-method (list RE_RegExObject 'Replace RE_SearchString RE_ReplaceString)))
               (if
                  (/= RE_Result RE_SearchString)
                  (setq RE_Return RE_Result)
               )
            )
            (
               T
               nil
            )
         )         
         (vlax-release-object RE_RegExObject)
      )
   )
   RE_Return
)&lt;/PRE&gt;</description>
      <pubDate>Thu, 14 Jun 2018 09:39:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/text-swap-using-a-slash/m-p/8067771#M103971</guid>
      <dc:creator>DannyNL</dc:creator>
      <dc:date>2018-06-14T09:39:04Z</dc:date>
    </item>
    <item>
      <title>Re: Text Swap using a slash (/)</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/text-swap-using-a-slash/m-p/8067974#M103972</link>
      <description>&lt;P&gt;As i just gave you one, i do like it, but ...&lt;/P&gt;&lt;P&gt;This code gives new meaning to the word: Overkill &lt;img id="smileytongue" class="emoticon emoticon-smileytongue" src="https://forums.autodesk.com/i/smilies/16x16_smiley-tongue.png" alt="Smiley Tongue" title="Smiley Tongue" /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 11:21:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/text-swap-using-a-slash/m-p/8067974#M103972</guid>
      <dc:creator>roland.r71</dc:creator>
      <dc:date>2018-06-14T11:21:23Z</dc:date>
    </item>
    <item>
      <title>Re: Text Swap using a slash (/)</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/text-swap-using-a-slash/m-p/8068352#M103973</link>
      <description>&lt;P&gt;Depends on how you look at it I guess.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The RegEx code is something which I wrote a long time ago and is part of my personal and companies library with (sub)functions. So I didn't write it for this purpose and I'm just re-using some of my old but already existing code.&lt;/P&gt;&lt;P&gt;And this RegEx function is way more powerful than then writing specific LISP code to just do one task only and can be used for possible future text handling as well.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 13:57:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/text-swap-using-a-slash/m-p/8068352#M103973</guid>
      <dc:creator>DannyNL</dc:creator>
      <dc:date>2018-06-14T13:57:47Z</dc:date>
    </item>
    <item>
      <title>Re: Text Swap using a slash (/)</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/text-swap-using-a-slash/m-p/8068367#M103974</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3144455"&gt;@DannyNL&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;Depends on how you look at it I guess.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The RegEx code is something which I wrote a long time ago and is part of my personal and companies library with (sub)functions. So I didn't write it for this purpose and I'm just re-using some of my old but already existing code.&lt;/P&gt;&lt;P&gt;And this RegEx function is way more powerful than then writing specific LISP code to just do one task only and can be used for possible future text handling as well.&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;BR /&gt;&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://forums.autodesk.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt; No need to explain. It was clear from the get go &lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://forums.autodesk.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 14:02:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/text-swap-using-a-slash/m-p/8068367#M103974</guid>
      <dc:creator>roland.r71</dc:creator>
      <dc:date>2018-06-14T14:02:00Z</dc:date>
    </item>
    <item>
      <title>Re: Text Swap using a slash (/)</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/text-swap-using-a-slash/m-p/8068383#M103975</link>
      <description>&lt;P&gt;It's just regular Text, no MText or Attribute&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 14:07:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/text-swap-using-a-slash/m-p/8068383#M103975</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-06-14T14:07:48Z</dc:date>
    </item>
    <item>
      <title>Re: Text Swap using a slash (/)</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/text-swap-using-a-slash/m-p/8068581#M103976</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;It's just regular Text, no MText or Attribute&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;In that case, this will do the trick: (note: it doesn't create a copy, but i could add that too)&lt;/P&gt;&lt;PRE&gt;(defun c:fliptext ( / ss txtent)

   (defun flipflop ( fliptxt / pos flip flop)
      (setq pos (vl-string-position (ascii "/") fliptxt)
            flip (substr fliptxt 1 pos)
            flop (substr fliptxt (+ 2 pos))
            fliptxt (strcat flop "/" flip)
      )
      fliptxt
   )
   
   (while (= ss nil)
      (setq ss (ssget ":S" '((0 . "TEXT"))))
   )
   (setq txtent (entget (ssname ss 0)))
   (setq txtent (subst (cons 1 (flipflop (cdr (assoc 1 txtent))))(assoc 1 txtent) txtent))
   (entmod txtent)
)&lt;/PRE&gt;</description>
      <pubDate>Thu, 14 Jun 2018 15:10:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/text-swap-using-a-slash/m-p/8068581#M103976</guid>
      <dc:creator>roland.r71</dc:creator>
      <dc:date>2018-06-14T15:10:53Z</dc:date>
    </item>
    <item>
      <title>Re: Text Swap using a slash (/)</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/text-swap-using-a-slash/m-p/8068787#M103977</link>
      <description>&lt;P&gt;I'm not worried about creating a copy. I'll have to copy the column of wiremarkers to the other end of the wire so that's easy.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks! I'll try it.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 16:31:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/text-swap-using-a-slash/m-p/8068787#M103977</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-06-14T16:31:12Z</dc:date>
    </item>
  </channel>
</rss>

