<?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: Please, help me edit lisp Import ID X Y Z Code to Autocad in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/please-help-me-edit-lisp-import-id-x-y-z-code-to-autocad/m-p/7461008#M113513</link>
    <description>&lt;P&gt;Dear, John uhden.&lt;/P&gt;&lt;P&gt;please view file attach. Pleaase help me. &amp;nbsp;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 15 Oct 2017 06:30:55 GMT</pubDate>
    <dc:creator>minhphuong_humg</dc:creator>
    <dc:date>2017-10-15T06:30:55Z</dc:date>
    <item>
      <title>Please, help me edit lisp Import ID X Y Z Code to Autocad</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/please-help-me-edit-lisp-import-id-x-y-z-code-to-autocad/m-p/7448145#M113511</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi Everybody.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Please help me edit lisp Import ID X Y Z Code to Autocad (file attach).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This lisp import ID, X, Y, Z, CODE (not unicode).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Help me, edit file lisp to import Code with text Unicode.&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Example data:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ID [space] X [space] Y [space] Z [space][space] CODE (Unicode)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you very much.&lt;/SPAN&gt;&lt;BR /&gt;&lt;I&gt;Link file attach:&lt;/I&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;I&gt;&lt;FONT color="blue"&gt;&lt;A href="https://www.mediafire.com/folder/b9c7e6b2e2472/Importcad" target="_blank"&gt;https://www.mediafire.com/folder/b9c7e6b2e2472/Importcad&lt;/A&gt;&lt;/FONT&gt;&lt;/I&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2017 14:21:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/please-help-me-edit-lisp-import-id-x-y-z-code-to-autocad/m-p/7448145#M113511</guid>
      <dc:creator>minhphuong_humg</dc:creator>
      <dc:date>2017-10-10T14:21:58Z</dc:date>
    </item>
    <item>
      <title>Re: Please, help me edit lisp Import ID X Y Z Code to Autocad</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/please-help-me-edit-lisp-import-id-x-y-z-code-to-autocad/m-p/7460582#M113512</link>
      <description>&lt;P&gt;I'm sorry, but I don't want to install some "Quick Converter" thing.&lt;/P&gt;
&lt;P&gt;Can't you just post the files?&lt;/P&gt;</description>
      <pubDate>Sat, 14 Oct 2017 16:37:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/please-help-me-edit-lisp-import-id-x-y-z-code-to-autocad/m-p/7460582#M113512</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2017-10-14T16:37:11Z</dc:date>
    </item>
    <item>
      <title>Re: Please, help me edit lisp Import ID X Y Z Code to Autocad</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/please-help-me-edit-lisp-import-id-x-y-z-code-to-autocad/m-p/7461008#M113513</link>
      <description>&lt;P&gt;Dear, John uhden.&lt;/P&gt;&lt;P&gt;please view file attach. Pleaase help me. &amp;nbsp;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 15 Oct 2017 06:30:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/please-help-me-edit-lisp-import-id-x-y-z-code-to-autocad/m-p/7461008#M113513</guid>
      <dc:creator>minhphuong_humg</dc:creator>
      <dc:date>2017-10-15T06:30:55Z</dc:date>
    </item>
    <item>
      <title>Re: Please, help me edit lisp Import ID X Y Z Code to Autocad</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/please-help-me-edit-lisp-import-id-x-y-z-code-to-autocad/m-p/7461514#M113514</link>
      <description>&lt;P&gt;This is what IMPO.TXT looks like when opened with Textpad, which did some conversion to system default characters...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1 459942.8601 2374653.465 1 B?n Nghiêu&lt;BR /&gt;2 465347.3047 2375267.236 2 Ph??ng N? Lào&lt;BR /&gt;3 465668.0444 2374305.462 3 B?n Chi?ng Sáo&lt;BR /&gt;4 465300.1694 2374339.447 4 Làng Bình Lãng&lt;BR /&gt;5 464730.8869 2377249.722 5 Chiêng S?o&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The description field looks like maybe Chinese to me.&amp;nbsp; But maybe that's okay.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Reading it from lisp line-by-line into a list looks like this...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;("ÿþ1\000\t\0004\0005\0009\0009\0004\0002\000.\0008\0006\0000\0001\000\t\0002\00&lt;BR /&gt;03\0007\0004\0006\0005\0003\000.\0004\0006\0005\000\t\0001\000\t\000\t\000B\000£&lt;BR /&gt;\036n\000 \000N\000g\000h\000i\000ê\000u\000" "\000" &lt;BR /&gt;"\0002\000\t\0004\0006\0005\0003\0004\0007\000.\0003\0000\0004\0007\000\t\0002\0&lt;BR /&gt;003\0007\0005\0002\0006\0007\000.\0002\0003\0006\000\t\0002\000\t\000\t\000P\000&lt;BR /&gt;h\000°\001Ý\036n\000g\000 \000N\000¡\036 \000L\000à\000o\000" "\000" &lt;BR /&gt;"\0003\000\t\0004\0006\0005\0006\0006\0008\000.\0000\0004\0004\0004\000\t\0002\0&lt;BR /&gt;003\0007\0004\0003\0000\0005\000.\0004\0006\0002\000\t\0003\000\t\000\t\000B\000&lt;BR /&gt;£\036n\000 \000C\000h\000i\000Á\036n\000g\000 \000S\000á\000o\000" "\000" &lt;BR /&gt;"\0004\000\t\0004\0006\0005\0003\0000\0000\000.\0001\0006\0009\0004\000\t\0002\0&lt;BR /&gt;003\0007\0004\0003\0003\0009\000.\0004\0004\0007\000\t\0004\000\t\000\t\000L\000&lt;BR /&gt;à\000n\000g\000 \000B\000ì\000n\000h\000 \000L\000ã\000n\000g\000" "\000" &lt;BR /&gt;"\0005\000\t\0004\0006\0004\0007\0003\0000\000.\0008\0008\0006\0009\000\t\0002\0&lt;BR /&gt;003\0007\0007\0002\0004\0009\000.\0007\0002\0002\000\t\0005\000\t\000\t\000C\000&lt;BR /&gt;h\000i\000ê\000n\000g\000 \000S\000¡\036o\000")&lt;/P&gt;</description>
      <pubDate>Sun, 15 Oct 2017 18:13:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/please-help-me-edit-lisp-import-id-x-y-z-code-to-autocad/m-p/7461514#M113514</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2017-10-15T18:13:35Z</dc:date>
    </item>
    <item>
      <title>Re: Please, help me edit lisp Import ID X Y Z Code to Autocad</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/please-help-me-edit-lisp-import-id-x-y-z-code-to-autocad/m-p/7462197#M113515</link>
      <description>&lt;P&gt;Dear, John.&lt;SPAN&gt;uhden.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;File attach, you choose font Tahoma or Time new roman (unicode).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;file impo:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1 459942.8601 2374653.465 1 Bản Nghiêu&lt;BR /&gt;2 465347.3047 2375267.236 2 Phường Nạ Lào&lt;BR /&gt;3 465668.0444 2374305.462 3 Bản Chiềng Sáo&lt;BR /&gt;4 465300.1694 2374339.447 4 Làng Bình Lãng&lt;BR /&gt;5 464730.8869 2377249.722 5 Chiêng Sạo&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Lisp:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(defun c:RFT(/ code data f h line pt pxy spc txt stt ten);Read File Txt&lt;BR /&gt;;| By : Gia Bach, gia_bach @ &lt;A href="http://www.CadViet.com" target="_blank"&gt;www.CadViet.com&lt;/A&gt; |;&lt;BR /&gt;(vl-load-com)&lt;BR /&gt;(defun Split(str / i kitu line lst txtPhanbiet)&lt;BR /&gt;(setq i 1 txtPhanbiet (strcat(chr 9)(chr 32)(chr 44)))&lt;BR /&gt;(while (&amp;lt; i (strlen str))&lt;BR /&gt;(setq kitu (substr str i 1))&lt;BR /&gt;(if (vl-string-search kitu txtPhanbiet)&lt;BR /&gt;(progn&lt;BR /&gt;(if (null Lst)&lt;BR /&gt;(setq Lst (list (substr Str 1 (- i 1))))&lt;BR /&gt;(setq Lst (append Lst (list (read (substr Str 1 (- i 1)))))))&lt;BR /&gt;(setq Str (substr Str (+ i 1)) i 1))&lt;BR /&gt;(setq i (1+ i)) ) )&lt;BR /&gt;(setq Lst (append Lst (list Str))) )&lt;BR /&gt;(or *h* (setq *h* 2 ))&lt;BR /&gt;(initget 6)&lt;BR /&gt;(setq h (getdist (strcat "\nNhap chieu cao Text &amp;lt;" (rtos *h*) "&amp;gt; :")) )&lt;BR /&gt;(if h (setq *h* h) (setq h *h*))&lt;BR /&gt;(if (setq ten (getfiled "Chon File txt" (getvar "dwgprefix") "txt" 8))&lt;BR /&gt;(progn&lt;BR /&gt;(or (tblsearch "layer" "Point") (command "-layer" "n" "Point" "") )&lt;BR /&gt;(or (tblsearch "layer" "Sothutu") (command "-layer" "n" "Sothutu" "c" 3 "Sothutu" "") )&lt;BR /&gt;(or (tblsearch "layer" "Caodo") (command "-layer" "n" "Caodo" "c" 4 "Caodo" "") )&lt;BR /&gt;(or (tblsearch "layer" "Code") (command "-layer" "n" "Code" "c" 2 "Code" "") )&lt;BR /&gt;(setq spc (vla-get-ModelSpace (vla-get-ActiveDocument(vlax-get-Acad-Object))))&lt;BR /&gt;(setq f (open (findfile ten) "r"))&lt;BR /&gt;(while (setq Line (read-line f))&lt;BR /&gt;(if (wcmatch Line (strcat "*"(chr 9)"*,*"(chr 32)"*,*`"(chr 44)"*"))&lt;BR /&gt;(progn&lt;BR /&gt;(setq data (split Line) code (last data))&lt;BR /&gt;(if (and&lt;BR /&gt;(= (vl-list-length data)5)&lt;BR /&gt;(setq pt (vl-remove code (cdr data)))&lt;BR /&gt;(not(vl-catch-all-error-p (vl-catch-all-apply 'vlax-3d-point pt))) )&lt;BR /&gt;(progn&lt;BR /&gt;(setq stt (car data) pXY (list (car pt)(cadr pt)))&lt;BR /&gt;(vla-put-Layer (vla-addpoint spc (vlax-3d-point pXY)) "Point")&lt;BR /&gt;(vla-put-Layer (setq txt (vla-addtext spc stt (vlax-3d-point (list 0 0 0)) h)) "Sothutu")&lt;BR /&gt;(vla-put-Alignment txt 8)&lt;BR /&gt;(vla-put-TextAlignmentPoint txt (vlax-3d-point pXY))&lt;BR /&gt;(vla-put-Layer (setq txt (vla-addtext spc code (vlax-3d-point (list 0 0 0)) h)) "Code")&lt;BR /&gt;(vla-put-Alignment txt 6)&lt;BR /&gt;(vla-put-TextAlignmentPoint txt (vlax-3d-point (polar pXY 0 (* 0.2 h))))&lt;BR /&gt;(vla-put-Layer (vla-addtext spc (caddr pt) (vlax-3d-point pXY) h) "Caodo")&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2017 06:17:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/please-help-me-edit-lisp-import-id-x-y-z-code-to-autocad/m-p/7462197#M113515</guid>
      <dc:creator>minhphuong_humg</dc:creator>
      <dc:date>2017-10-16T06:17:03Z</dc:date>
    </item>
    <item>
      <title>Re: Please, help me edit lisp Import ID X Y Z Code to Autocad</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/please-help-me-edit-lisp-import-id-x-y-z-code-to-autocad/m-p/7462289#M113516</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;You have to save the text file as ANSI encoding and then try with the below code.&lt;/P&gt;
&lt;P&gt;Notepad-&amp;gt;File menu-&amp;gt;Save as-&amp;gt; and then select Encoding: ANSI as shown below.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 705px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/413320i0A77C3B5639ECCC9/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(defun c:RFT(/ code data f h line pt pxy spc txt stt ten);Read File Txt
 ;|  By : Gia Bach, gia_bach @  www.CadViet.com             |;    
 (vl-load-com)


;; String to List  -  Lee Mac
;; Separates a string using a given delimiter
;; str - [str] String to process
;; del - [str] Delimiter by which to separate the string
;; Returns: [lst] List of strings
 
(defun LM:str-&amp;gt;lst ( str del / pos )
    (if (setq pos (vl-string-search del str))
        (cons (substr str 1 pos) (LM:str-&amp;gt;lst (substr str (+ pos 1 (strlen del))) del))
        (list str)
    )
)

;;To convert the list of string value to list of real value
(defun CreatePointList(lst / pnt) 
	(setq pnt (list 
		(distof (car lst))
		(distof (cadr lst))
		(distof (caddr lst))
		) )
)
 
 (or *h* (setq *h* 2 ))
 (initget 6)
 (setq h (getdist (strcat "\nNhap chieu cao Text &amp;lt;" (rtos *h*) "&amp;gt; :")) )
 (if h (setq *h* h) (setq h *h*))
 (if (setq ten (getfiled "Chon File txt" (getvar "dwgprefix") "txt" 8))
   (progn
     (or (tblsearch "layer" "Point") (command "-layer" "n" "Point" "") )
     (or (tblsearch "layer" "Sothutu") (command "-layer" "n" "Sothutu" "c" 3 "Sothutu" "") )
     (or (tblsearch "layer" "Caodo") (command "-layer" "n" "Caodo" "c" 4 "Caodo" "") )
     (or (tblsearch "layer" "Code") (command "-layer" "n" "Code" "c" 2 "Code" "") )
     (setq spc (vla-get-ModelSpace (vla-get-ActiveDocument(vlax-get-Acad-Object))))
     (setq f (open (findfile ten) "r"))
     (while (setq Line (read-line f))
(if (wcmatch Line (strcat "*"(chr 9)"*,*"(chr 32)"*,*`"(chr 44)"*"))
  (progn
    (setq data (LM:str-&amp;gt;lst Line (chr 9)) code (last data))
    (if (and
	  (= (vl-list-length data)5)
	  (setq pt (CreatePointList (vl-remove code (cdr data))))
	  (not(vl-catch-all-error-p (vl-catch-all-apply 'vlax-3d-point pt))))
      (progn
		(vla-put-Layer (vla-addpoint spc (vlax-3d-point pt)) "Point")
		(vla-put-Layer (setq txt (vla-addtext spc (car data) (vlax-3d-point (list 0 0 0)) h)) "Sothutu")
		(vla-put-Alignment txt 8)
		(vla-put-TextAlignmentPoint txt (vlax-3d-point pt))
		(vla-put-Layer (setq txt (vla-addtext spc  code (vlax-3d-point (list 0 0 0)) h)) "Code")
		(vla-put-Alignment txt 6)
		(vla-put-TextAlignmentPoint txt (vlax-3d-point (polar pt 0 (* 0.2 h))))
		(vla-put-Layer (vla-addtext spc (caddr pt) (vlax-3d-point pt) h) "Caodo")
	))))) ) )
 (princ)
 )&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2017 07:06:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/please-help-me-edit-lisp-import-id-x-y-z-code-to-autocad/m-p/7462289#M113516</guid>
      <dc:creator>Ajilal.Vijayan</dc:creator>
      <dc:date>2017-10-16T07:06:47Z</dc:date>
    </item>
    <item>
      <title>Re: Please, help me edit lisp Import ID X Y Z Code to Autocad</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/please-help-me-edit-lisp-import-id-x-y-z-code-to-autocad/m-p/7462519#M113517</link>
      <description>&lt;P&gt;Dear Ajilal,&lt;/P&gt;&lt;P&gt;You do not understand my idea.&lt;BR /&gt;I want to spray onto cad coordinates and note is Unicode code (accented letter).&lt;BR /&gt;If I choose ANSI then the text file will lose the original formatting that I desire.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2017 08:56:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/please-help-me-edit-lisp-import-id-x-y-z-code-to-autocad/m-p/7462519#M113517</guid>
      <dc:creator>minhphuong_humg</dc:creator>
      <dc:date>2017-10-16T08:56:15Z</dc:date>
    </item>
    <item>
      <title>Re: Please, help me edit lisp Import ID X Y Z Code to Autocad</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/please-help-me-edit-lisp-import-id-x-y-z-code-to-autocad/m-p/7462596#M113518</link>
      <description>&lt;P&gt;In that case I have updated the code by including the code from Lee Mac [&lt;A href="http://www.theswamp.org/index.php?topic=39814" target="_blank"&gt;http://www.theswamp.org/index.php?topic=39814&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Try the below code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(defun c:RFT(/ code data f h line pt pxy spc txt stt ten);Read File Txt
 ;|  By : Gia Bach, gia_bach @  www.CadViet.com             |;    
 (vl-load-com)
 
 (or *h* (setq *h* 2 ))
 (initget 6)
 (setq h (getdist (strcat "\nNhap chieu cao Text &amp;lt;" (rtos *h*) "&amp;gt; :")) )
 (if h (setq *h* h) (setq h *h*))
 (if (setq ten (getfiled "Chon File txt" (getvar "dwgprefix") "txt" 8))
   (progn
     (or (tblsearch "layer" "Point") (command "-layer" "n" "Point" "") )
     (or (tblsearch "layer" "Sothutu") (command "-layer" "n" "Sothutu" "c" 3 "Sothutu" "") )
     (or (tblsearch "layer" "Caodo") (command "-layer" "n" "Caodo" "c" 4 "Caodo" "") )
     (or (tblsearch "layer" "Code") (command "-layer" "n" "Code" "c" 2 "Code" "") )
     (setq spc (vla-get-ModelSpace (vla-get-ActiveDocument(vlax-get-Acad-Object))))
     (setq f (open (findfile ten) "r"))
	 
    (foreach Line (ReadUnicode ten) 
		(if (wcmatch Line (strcat "*"(chr 9)"*,*"(chr 32)"*,*`"(chr 44)"*"))
		  (progn
			(setq data (LM:str-&amp;gt;lst Line (chr 9)) code (last data))
			(if (and
			  (= (vl-list-length data)6)
			  (setq pt (CreatePointList (vl-remove code (cdr data))))
			  (not(vl-catch-all-error-p (vl-catch-all-apply 'vlax-3d-point pt))))
			  (progn
				(vla-put-Layer (vla-addpoint spc (vlax-3d-point pt)) "Point")
				(vla-put-Layer (setq txt (vla-addtext spc (car data) (vlax-3d-point (list 0 0 0)) h)) "Sothutu")
				(vla-put-Alignment txt 8)
				(vla-put-TextAlignmentPoint txt (vlax-3d-point pt))
				(vla-put-Layer (setq txt (vla-addtext spc  code (vlax-3d-point (list 0 0 0)) h)) "Code")
				(vla-put-Alignment txt 6)
				(vla-put-TextAlignmentPoint txt (vlax-3d-point (polar pt 0 (* 0.2 h))))
				(vla-put-Layer (vla-addtext spc (caddr pt) (vlax-3d-point pt) h) "Caodo")
			)))
			);if
	);for 
	);progn 
	);if
 (princ)
 );defun
 
;; String to List  -  Lee Mac
;; Separates a string using a given delimiter
;; str - [str] String to process
;; del - [str] Delimiter by which to separate the string
;; Returns: [lst] List of strings
 
(defun LM:str-&amp;gt;lst ( str del / pos )
    (if (setq pos (vl-string-search del str))
        (cons (substr str 1 pos) (LM:str-&amp;gt;lst (substr str (+ pos 1 (strlen del))) del))
        (list str)
    )
)

;;-
;;To convert the list of string value to list of real value
(defun CreatePointList(lst / pnt) 
	(setq pnt (list 
		(distof (car lst))
		(distof (cadr lst))
		(distof (caddr lst))
		) )
)
 
 
 ;;http://www.theswamp.org/index.php?topic=39814
 ;;------------------------------------------------------
 (defun ReadUnicode ( file / _padzeros lst out n )

    (defun _padzeros ( s )
        (if (&amp;lt; (strlen s) 4) (_padzeros (strcat "0" s)) s)
    )
    (if (setq lst (LM:ReadBinaryStream file))
        (progn
            (cond
                (   (and (= 255 (car lst)) (= 254 (cadr lst))) ;; UTF-16 Little Endian
                    (setq lst (cddr lst))
                    (while (cadr lst)
                        (if (&amp;lt; (setq n (+ (car lst) (* 256 (cadr lst)))) 128)
                            (setq out (cons (chr n) out))
                            (setq out (cons (strcat "\\U+" (_padzeros (LM:Dec-&amp;gt;Base n 16))) out))
                        )       
                        (setq lst (cddr lst))
                    )
                    (setq out (reverse out))
                )
                (   (and (= 254 (car lst)) (= 255 (cadr lst))) ;; UTF-16 Big Endian
                    (setq lst (cddr lst))
                    (while (cadr lst)
                        (if (&amp;lt; (setq n (+ (cadr lst) (* 256 (car lst)))) 128)
                            (setq out (cons (chr n) out))
                            (setq out (cons (strcat "\\U+" (_padzeros (LM:Dec-&amp;gt;Base n 16))) out))
                        )
                        (setq lst (cddr lst))
                    )
                    (setq out (reverse out))
                )
                (   (setq out (mapcar 'chr lst))   ) ;; Assume ASCII
            )
           
            (LM:str-&amp;gt;lst (apply 'strcat out) "\r\n")
        )
    )
)

(defun LM:Dec-&amp;gt;Base ( n b )
    (if (&amp;lt; n b)
        (chr (+ n (if (&amp;lt; n 10) 48 55)))
        (strcat (LM:Dec-&amp;gt;Base (/ n b) b) (LM:Dec-&amp;gt;Base (rem n b) b))
    )
)


(defun LM:ReadBinaryStream ( file / adostream result )
    (if
        (and
            (setq file (findfile file))
            (setq adostream (vlax-create-object "ADODB.Stream"))
        )
        (progn
            (setq result
                (vl-catch-all-apply
                    (function
                        (lambda nil
                            (vlax-put-property  adostream 'type 1)
                            (vlax-invoke-method adostream 'open nil nil nil nil nil)
                            (vlax-invoke-method adostream 'loadfromfile file)
                            (vlax-put-property  adostream 'position 0)
                            (setq result (vlax-invoke-method adostream 'read -1))
                            (vlax-invoke-method adostream 'close)
                            result
                        )
                    )
                )
            )
            (vlax-release-object adostream)
            (if (not (vl-catch-all-error-p result))
                (vlax-safearray-&amp;gt;list (vlax-variant-value result))
            )
        )
    )
)&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2017 09:30:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/please-help-me-edit-lisp-import-id-x-y-z-code-to-autocad/m-p/7462596#M113518</guid>
      <dc:creator>Ajilal.Vijayan</dc:creator>
      <dc:date>2017-10-16T09:30:37Z</dc:date>
    </item>
  </channel>
</rss>

