<?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: Lisp to change alphabet in line type. in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-alphabet-in-line-type/m-p/12487655#M19413</link>
    <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/10617541"&gt;@arpansark0544TCX&lt;/a&gt;&amp;nbsp; Here you have updated code. &lt;STRONG&gt;Stop opening new posts&lt;/STRONG&gt; for particular issue and add new requests to original posts.&lt;/P&gt;
&lt;P&gt;Here you have modified original code that solves your first request, based on it you defined 3 additional posts without reason.&lt;/P&gt;
&lt;LI-CODE lang="lisp"&gt;(defun c:pow_line_overlap ( / *error* duplicates ss e ent i ptlist p ovl old_expert dup)

;https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-numbering-overlapping-lines/td-p/12478216
;author: hak-vz
;https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5530556
; 10. january 2024. 
	(defun *error* ( msg )
		(if (not (member msg '("Function cancelled" "quit / exit abort")))
			(princ)
		)
		(setvar 'cmdecho 1)
		(setvar 'expert old_expert)
		(vla-endundomark adoc)
		(princ)
	)
	(defun duplicates ( lst )
		(if lst
			(if (member (car lst) (cdr lst))
				(cons (car lst) (duplicates (vl-remove (car lst) (cdr lst))))
				(duplicates (vl-remove (car lst) (cdr lst)))
			)
		)
	)
	(defun pick ( msg / )
		(setq e (car(entsel msg)))
		(cond 
			((and (not e) (= (getvar 'Errno) 7))
				(princ "\nNothing selected. Try again!")
				(pick msg)
			)
		)
	)
	(setq adoc (vla-get-ActiveDocument (vlax-get-acad-object)))
	(vla-endundomark adoc)
	(vla-startundomark adoc)	
	(setq old_expert (getvar 'expert))
	(setvar 'expert 3)
	(setq start_layername (cdr (assoc 8 (entget(pick "\nSelect entity on a layer to select all lines &amp;gt;")))))
	(setq ss (ssget (list (cons 0 "LINE")(cons 8 start_layername))) i -1)
	(setq final_layername (cdr (assoc 8 (entget(pick "\nSelect entity on a final layer to change entity layer name &amp;gt;")))))
	(setq linetype_group (getstring "\nEnter linetype group to change entity (A B C D E) &amp;gt;"))
	(setvar 'cmdecho 0)
	(while (&amp;lt; (setq i (1+ i)) (sslength ss))
		(setq 
			ent (entget (ssname ss i))
			a (cdr (assoc 10 ent))
			b (cdr (assoc 11 ent))
			ptlist (cons (mapcar 'fix (mapcar '* '(0.5 0.5)(mapcar '+ a b))) ptlist)
		)
	)
	(foreach pt (duplicates ptlist)
		(setq ss (ssget "_C" (mapcar '+ '(15 15) pt) (mapcar '+ '(-15 -15) pt) '((0 . "LINE"))))
		(setq i 0 ovl (sslength ss))
		(while (&amp;lt; (setq i (1+ i)) (sslength ss))
			(entdel (ssname ss i))
		)
		(setq e (ssname ss 0))
		(command "_.linetype" "load" (strcat linetype_group (itoa ovl)) "acad.lin" "")
		(command "_.chprop" e "" "LTYPE" (strcat "C" (itoa ovl)) "")
		(command "_.chprop" e "" "LTSCALE" 55 "")
		(setq ent (entget e))
		(setq ent (subst (cons 8 final_layername)(assoc 8 ent) ent))
		(setq ent (entmod ent))
	)
	
	(setvar 'expert old_expert)
	(setvar 'cmdecho 0)
	(vla-endundomark adoc)
	(princ "\nDone!")
	(princ)
)&lt;/LI-CODE&gt;</description>
    <pubDate>Wed, 10 Jan 2024 07:10:01 GMT</pubDate>
    <dc:creator>hak_vz</dc:creator>
    <dc:date>2024-01-10T07:10:01Z</dc:date>
    <item>
      <title>Lisp to change alphabet in line type.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-alphabet-in-line-type/m-p/12484978#M19403</link>
      <description>&lt;P&gt;Is there a lisp which changes the alphabet in line type?&lt;/P&gt;&lt;P&gt;ie. from &lt;U&gt;&lt;STRONG&gt;C to E&amp;nbsp;&lt;/STRONG&gt;&lt;/U&gt; in practical use should do like A1 TO B1.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The lisp should ask the user which alphabet to use and then replace the line type from the line type stored in .lin.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="arpansark0544TCX_0-1704775565539.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1311801i79C49FA3BE6E9337/image-size/medium?v=v2&amp;amp;px=400" role="button" title="arpansark0544TCX_0-1704775565539.png" alt="arpansark0544TCX_0-1704775565539.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="arpansark0544TCX_1-1704775579089.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1311802i0E5C0B2B8F8B3C21/image-size/medium?v=v2&amp;amp;px=400" role="button" title="arpansark0544TCX_1-1704775579089.png" alt="arpansark0544TCX_1-1704775579089.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="arpansark0544TCX_3-1704775624106.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1311804iA282E570DF415AB8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="arpansark0544TCX_3-1704775624106.png" alt="arpansark0544TCX_3-1704775624106.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jan 2024 04:48:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-alphabet-in-line-type/m-p/12484978#M19403</guid>
      <dc:creator>arpansark0544TCX</dc:creator>
      <dc:date>2024-01-09T04:48:43Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to change alphabet in line type.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-alphabet-in-line-type/m-p/12484994#M19404</link>
      <description>&lt;P&gt;I think that’s a very bad idea to completely replace the definition of a set linetype. Not only is the current dwg impacted but also any other dwg that previously had used that linetype definition. The better idea is to create a different linetype with similar name and then load that newly defined linetype to apply it to a selected object or layer…my 2 cents&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jan 2024 05:06:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-alphabet-in-line-type/m-p/12484994#M19404</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2024-01-09T05:06:22Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to change alphabet in line type.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-alphabet-in-line-type/m-p/12485016#M19405</link>
      <description>&lt;P&gt;Sir, I have already defined the line type and I intend to replace the line with a specific letter and number.&lt;/P&gt;&lt;P&gt;Doing so I think will not affect the drawing or so. Even so, we can do this operation in the new drawing.&lt;/P&gt;&lt;P&gt;Let me know your thoughts.&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="arpansark0544TCX_0-1704777800875.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1311808iF2D1C181A23B7986/image-size/medium?v=v2&amp;amp;px=400" role="button" title="arpansark0544TCX_0-1704777800875.png" alt="arpansark0544TCX_0-1704777800875.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jan 2024 05:25:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-alphabet-in-line-type/m-p/12485016#M19405</guid>
      <dc:creator>arpansark0544TCX</dc:creator>
      <dc:date>2024-01-09T05:25:21Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to change alphabet in line type.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-alphabet-in-line-type/m-p/12485059#M19406</link>
      <description>&lt;P&gt;I see all your custom Linetypes. Again this is something I would not do or recommend.&lt;/P&gt;&lt;P&gt;But here are the steps I would take for example to change linetype named "&lt;STRONG&gt;C1&lt;/STRONG&gt;" to use instead of the characters "&lt;STRONG&gt;C1&lt;/STRONG&gt;" to "&lt;STRONG&gt;E1&lt;/STRONG&gt;"&lt;/P&gt;&lt;P&gt;1.&amp;nbsp;use &lt;STRONG&gt;(findfile"acad.lin")&lt;/STRONG&gt; to locate where &lt;STRONG&gt;AutoCAD&lt;/STRONG&gt; sees&amp;nbsp;&lt;STRONG&gt;acad.lin&lt;/STRONG&gt; is&lt;/P&gt;&lt;P&gt;2. use &lt;STRONG&gt;(vl-file-rename)&lt;/STRONG&gt; function to rename &lt;STRONG&gt;acad.lin&lt;/STRONG&gt; to a unique filename like to the current date-hour-minute-sec.lin file&lt;/P&gt;&lt;P&gt;3. then use &lt;STRONG&gt;(open)&lt;/STRONG&gt; function to read through each line of this unique filename &amp;amp; at the same time write each line to a new &lt;STRONG&gt;acad.lin&lt;/STRONG&gt; file&lt;/P&gt;&lt;P&gt;4. since beginning of each new linetype definition starts with * then &lt;STRONG&gt;*C1&lt;/STRONG&gt; is what I'll be searching for a match using:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(wcmatch readeachline "`*C1`,C1*")&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;5. setq the next line read to say nextline which would contain the &lt;STRONG&gt;"C1"&lt;/STRONG&gt; to search &amp;amp; replace with &lt;STRONG&gt;"E1"&lt;/STRONG&gt; using:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(vl-string-subst "E1" "C1" nextline)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;6. write this new information and the remaining information from the rest of the linetype file into the new &lt;STRONG&gt;acad.lin&lt;/STRONG&gt; file&lt;/P&gt;&lt;P&gt;7. use &lt;STRONG&gt;(vl-file-delete)&lt;/STRONG&gt; function to delete the original renamed linetype file&lt;/P&gt;&lt;P&gt;7. now reload that &lt;STRONG&gt;"C1&lt;/STRONG&gt;" linetype definition which now shows "&lt;STRONG&gt;E1&lt;/STRONG&gt;" overwriting the previous definition into the current drawing using:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(vl-cmdf"_.Linetype""_Load" "C1" "" "_Y" "")&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;8. lastly do a regen to see the changes using: &lt;STRONG&gt;(vl-cmd"_.Regen")&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jan 2024 06:12:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-alphabet-in-line-type/m-p/12485059#M19406</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2024-01-09T06:12:33Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to change alphabet in line type.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-alphabet-in-line-type/m-p/12487123#M19407</link>
      <description>&lt;P&gt;You can read 1 linetype from a custom .lin file if the&amp;nbsp; "E3" is not inside the current dwg. No need to play around with acad.lin etc. This code uses "CUSTOM.lin" which is located in the search path.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(setq  doc (vla-get-activedocument (vlax-get-acad-object))) ; open database

(defun loadLinetype (doc LineTypeName FileName)
  (if (and
        (not (existLinetype doc LineTypeName))
        (vl-catch-all-error-p
          (vl-catch-all-apply
            'vla-load
            (list
              (vla-get-Linetypes doc)
              LineTypeName
              FileName
            )
          )
        )
      )
    nil
    T
  )
)

(defun existLinetype (doc LineTypeName / item loaded)
  (vlax-for item (vla-get-linetypes doc)
    (if (= (strcase (vla-get-name item)) (strcase LineTypeName))
      (setq loaded T)
    )
  )
)

;load missing linetypes
;;; returns: T if loaded else nil
(loadLinetype doc "Fence" "custom.lin")
(loadLinetype doc "Tree" "custom.lin")
(loadLinetype doc "Water_main" "custom.lin")
(loadLinetype doc "Gas_main"  "custom.lin")
(loadLinetype doc "Sewer_main" "custom.lin")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1st step for me is to remove all the custom linetypes from ACAD.lin and save as suggested in a custom.lin, I have always stayed away from touching the default acad stuff.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jan 2024 23:22:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-alphabet-in-line-type/m-p/12487123#M19407</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2024-01-09T23:22:58Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to change alphabet in line type.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-alphabet-in-line-type/m-p/12487280#M19408</link>
      <description>&lt;P&gt;Ordinarily I would agree that it's better to keep custom linetype definitions out of the acad.lin [or acadiso.lin, etc.] file, as much for ease of upgrading to new versions as for any other reason, &lt;STRONG&gt;BUT&lt;/STRONG&gt; here's one &lt;EM&gt;advantage&lt;/EM&gt; of having them all included within that:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When either:&lt;/P&gt;
&lt;P&gt;1.&amp;nbsp; assigning a linetype property to an &lt;STRONG&gt;&lt;EM&gt;object&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;[or objects] by way of the LType option of a CHPROP command [or the equivalent, the LType option within the Properties option of a CHANGE command], or&lt;/P&gt;
&lt;P&gt;2.&amp;nbsp; assigning a linetype to a &lt;STRONG&gt;&lt;EM&gt;Layer&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;[or Layers] by way of the Ltype option in a -LAYER command,&lt;/P&gt;
&lt;P&gt;there's an interesting and convenient fact to keep in mind.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;If&lt;/STRONG&gt;&lt;/EM&gt; the linetype in question &lt;EM&gt;is defined in the acad.lin&lt;/EM&gt; [or acadiso.lin, etc.] file that AutoCAD is getting linetypes from, &lt;EM&gt;&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;it is not necessary for the linetype to be loaded into the drawing first&lt;/FONT&gt;.&lt;/STRONG&gt;&amp;nbsp; AutoCAD will find it.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So in your primary scenario, when you want to change something of linetype C1 to E1, once you have determined [by User prompt input of the letters to change from and to, or built=in combinations, or something] that E1 is the linetype you want to change it to, this will do it:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&lt;FONT color="#000000"&gt;(command "_.chprop" &lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#00CCFF"&gt;&lt;EM&gt;TheObject(s)&lt;/EM&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#000000"&gt; "" "_.ltype" "E1" "")&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;You &lt;EM&gt;don't&lt;/EM&gt; need to either check whether the linetype is loaded in the drawing, nor load it if not.&amp;nbsp; It will &lt;EM&gt;become&lt;/EM&gt; loaded in the process.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It &lt;EM&gt;does&lt;/EM&gt; require that the linetype definition exists, &lt;EM&gt;in that acad&lt;FONT size="2"&gt;[iso]&lt;/FONT&gt;.lin file&lt;/EM&gt;, which it sounds like in your case you're sure it does.&amp;nbsp; It will not find it if it's in a separate custom-linetypes file, even if that's in a Support File Search Path, without nosing around in that as already described.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2024 00:51:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-alphabet-in-line-type/m-p/12487280#M19408</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2024-01-10T00:51:16Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to change alphabet in line type.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-alphabet-in-line-type/m-p/12487281#M19409</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6254908"&gt;@Sea-Haven&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Back in 2000 or so, I wrote a function that would write a linetype definition in the current dwg to a .lin file of choice.&amp;nbsp; I see now that it would be easy to create (copy) a new linetype from an existing and then (optionally) write it to a .lin file.&amp;nbsp; All you have to do is replace a couple of strings in one line of the definition.&lt;/P&gt;&lt;P&gt;I, too, always use Custom.lin.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2024 00:52:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-alphabet-in-line-type/m-p/12487281#M19409</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2024-01-10T00:52:09Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to change alphabet in line type.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-alphabet-in-line-type/m-p/12487463#M19410</link>
      <description>&lt;P&gt;Sir thank you for your time.&lt;/P&gt;&lt;P&gt;And in addition to your code can you paste a screenshot? To under stand the flow of the code&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2024 03:55:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-alphabet-in-line-type/m-p/12487463#M19410</guid>
      <dc:creator>arpansark0544TCX</dc:creator>
      <dc:date>2024-01-10T03:55:22Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to change alphabet in line type.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-alphabet-in-line-type/m-p/12487473#M19411</link>
      <description>&lt;P&gt;Sir, I got your point there. Will implement it right now. But can you help to solve the existing solution to the problem?&lt;/P&gt;&lt;P&gt;As you see I have a complex network of conduits. The number on the line type indicates the number of runs of the conduit and the alphabet(text) indicates the service of it.&lt;/P&gt;&lt;P&gt;In my previous posts in the forum, I found the solutions to many of my problems. but there is a minor issue as the code by&amp;nbsp;&lt;A href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5530556" target="_self"&gt;&lt;SPAN class=""&gt;hak_vz&lt;/SPAN&gt;&lt;/A&gt;&amp;nbsp;was able to work on a single type of the line type (CX).&amp;nbsp;&lt;/P&gt;&lt;P&gt;As there are many other services I want to change the alphabet of the line type making numbers the same as before.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As shown in the post-1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kindly let me know your thoughts on this.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2024 04:13:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-alphabet-in-line-type/m-p/12487473#M19411</guid>
      <dc:creator>arpansark0544TCX</dc:creator>
      <dc:date>2024-01-10T04:13:04Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to change alphabet in line type.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-alphabet-in-line-type/m-p/12487650#M19412</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/10617541"&gt;@arpansark0544TCX&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's time for you to start writing your code, and learn from code provided before.&lt;/P&gt;
&lt;P&gt;I want you to create your code using following&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="lisp"&gt;(setq e (car(entsel))
..... take name of lt
(command "_.linetype" "load" name "acad.lin" "")
(command "_.chprop" e "" "LTYPE" (strcat "C" (itoa ovl)) "")
(command "_.chprop" e "" "LTSCALE" 55 "")
(princ)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2024 07:06:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-alphabet-in-line-type/m-p/12487650#M19412</guid>
      <dc:creator>hak_vz</dc:creator>
      <dc:date>2024-01-10T07:06:25Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to change alphabet in line type.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-alphabet-in-line-type/m-p/12487655#M19413</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/10617541"&gt;@arpansark0544TCX&lt;/a&gt;&amp;nbsp; Here you have updated code. &lt;STRONG&gt;Stop opening new posts&lt;/STRONG&gt; for particular issue and add new requests to original posts.&lt;/P&gt;
&lt;P&gt;Here you have modified original code that solves your first request, based on it you defined 3 additional posts without reason.&lt;/P&gt;
&lt;LI-CODE lang="lisp"&gt;(defun c:pow_line_overlap ( / *error* duplicates ss e ent i ptlist p ovl old_expert dup)

;https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-numbering-overlapping-lines/td-p/12478216
;author: hak-vz
;https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5530556
; 10. january 2024. 
	(defun *error* ( msg )
		(if (not (member msg '("Function cancelled" "quit / exit abort")))
			(princ)
		)
		(setvar 'cmdecho 1)
		(setvar 'expert old_expert)
		(vla-endundomark adoc)
		(princ)
	)
	(defun duplicates ( lst )
		(if lst
			(if (member (car lst) (cdr lst))
				(cons (car lst) (duplicates (vl-remove (car lst) (cdr lst))))
				(duplicates (vl-remove (car lst) (cdr lst)))
			)
		)
	)
	(defun pick ( msg / )
		(setq e (car(entsel msg)))
		(cond 
			((and (not e) (= (getvar 'Errno) 7))
				(princ "\nNothing selected. Try again!")
				(pick msg)
			)
		)
	)
	(setq adoc (vla-get-ActiveDocument (vlax-get-acad-object)))
	(vla-endundomark adoc)
	(vla-startundomark adoc)	
	(setq old_expert (getvar 'expert))
	(setvar 'expert 3)
	(setq start_layername (cdr (assoc 8 (entget(pick "\nSelect entity on a layer to select all lines &amp;gt;")))))
	(setq ss (ssget (list (cons 0 "LINE")(cons 8 start_layername))) i -1)
	(setq final_layername (cdr (assoc 8 (entget(pick "\nSelect entity on a final layer to change entity layer name &amp;gt;")))))
	(setq linetype_group (getstring "\nEnter linetype group to change entity (A B C D E) &amp;gt;"))
	(setvar 'cmdecho 0)
	(while (&amp;lt; (setq i (1+ i)) (sslength ss))
		(setq 
			ent (entget (ssname ss i))
			a (cdr (assoc 10 ent))
			b (cdr (assoc 11 ent))
			ptlist (cons (mapcar 'fix (mapcar '* '(0.5 0.5)(mapcar '+ a b))) ptlist)
		)
	)
	(foreach pt (duplicates ptlist)
		(setq ss (ssget "_C" (mapcar '+ '(15 15) pt) (mapcar '+ '(-15 -15) pt) '((0 . "LINE"))))
		(setq i 0 ovl (sslength ss))
		(while (&amp;lt; (setq i (1+ i)) (sslength ss))
			(entdel (ssname ss i))
		)
		(setq e (ssname ss 0))
		(command "_.linetype" "load" (strcat linetype_group (itoa ovl)) "acad.lin" "")
		(command "_.chprop" e "" "LTYPE" (strcat "C" (itoa ovl)) "")
		(command "_.chprop" e "" "LTSCALE" 55 "")
		(setq ent (entget e))
		(setq ent (subst (cons 8 final_layername)(assoc 8 ent) ent))
		(setq ent (entmod ent))
	)
	
	(setvar 'expert old_expert)
	(setvar 'cmdecho 0)
	(vla-endundomark adoc)
	(princ "\nDone!")
	(princ)
)&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 10 Jan 2024 07:10:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-alphabet-in-line-type/m-p/12487655#M19413</guid>
      <dc:creator>hak_vz</dc:creator>
      <dc:date>2024-01-10T07:10:01Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to change alphabet in line type.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-alphabet-in-line-type/m-p/12489640#M19414</link>
      <description>&lt;P&gt;Try this, note you have to change the location of the custom file 'D:\\acadtemp\\Arpan.lin" to where you have saved.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;; https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-alphabet-in-line-type/td-p/12484978


(defun loadLinetype (LineTypeName filename / )
  (if (and
        (not (existLinetype LineTypeName))
        (vl-catch-all-error-p
          (vl-catch-all-apply
            'vla-load
            (list
              (vla-get-Linetypes doc)
              LineTypeName
              FileName
            )
          )
        )
      )
    nil
    T
  )
)

(defun existLinetype (LineTypeName / item loaded)
  (vlax-for item (vla-get-linetypes doc)
    (if (= (strcase (vla-get-name item)) (strcase LineTypeName))
      (setq loaded "Yes")
    )
  )
  (princ)
)

;load missing linetypes
;;; returns: T if loaded else nil

(defun c:chgln ( / )
(setq  doc (vla-get-activedocument (vlax-get-acad-object))) ; open database
(setq obj (vlax-ename-&amp;gt;vla-object (car  (entsel "Pick a custom line "))))
(setq lt (vlax-get obj 'Linetype))
(setq new (strcase (getstring "\nPlease enter alpha Character A-Z ")))
(setq char (substr lt 1 1))
(if (and (= new "D")(&amp;gt; (strlen lt) 1))
  (progn
  (Alert "There is no DX linetypes \nWill exit now")
  (EXIT)
  )
)
(if (&amp;gt; (strlen lt) 1)
(progn
(setq num (substr lt 2))
(setq newstr (strcat new num))
(LoadLinetype newstr "D:\\acadtemp\\arpan.lin")
)
(alert "do single ")
)
(vlax-put obj 'LInetype newstr)
(princ)
)
(c:chgln)&lt;/LI-CODE&gt;&lt;P&gt;Limited testing.&lt;/P&gt;&lt;P&gt;I did notice there are no "Dx" line types.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2024 00:41:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-alphabet-in-line-type/m-p/12489640#M19414</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2024-01-11T00:41:55Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to change alphabet in line type.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-alphabet-in-line-type/m-p/12498734#M19415</link>
      <description>Dear hak_vz&lt;BR /&gt;&lt;BR /&gt;I thought that the problems were related but unique so it would be a good way to track them and get solutions to them. But as per your instruction, I will post in the same post.&lt;BR /&gt;&lt;BR /&gt;I have just started learning Lisp. Given the learning curve, I want to thank you for helping me out.&lt;BR /&gt;</description>
      <pubDate>Tue, 16 Jan 2024 04:38:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-alphabet-in-line-type/m-p/12498734#M19415</guid>
      <dc:creator>arpansark0544TCX</dc:creator>
      <dc:date>2024-01-16T04:38:09Z</dc:date>
    </item>
  </channel>
</rss>

