<?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: Extract attributes in numerical order in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/extract-attributes-in-numerical-order/m-p/7272148#M117012</link>
    <description>&lt;P&gt;Hi &lt;SPAN&gt;&lt;A href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/564264" target="_self"&gt;&lt;SPAN&gt;pbejse&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;when I run this lisp, it will spit all the numbers but it will not do it in numerical order E.g.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;1 1/4"&lt;/P&gt;&lt;P&gt;1 1/2"&lt;/P&gt;&lt;P&gt;1 3/4"&lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;2 1/4"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;see the pic attached. the row of numbers on the left are the symbols we use as a short cut to enter fractional numbers. the row of numbers on the right are the numbers who's fonts were corrected to show the fraction number properly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, just to be clear,&amp;nbsp; in each row you can see two sets of number E.g.&amp;nbsp; 3~4 1497 = 3 1/4" 1497&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3 1/4" refers to the chair size&lt;/P&gt;&lt;P&gt;1497 refers to the number of chairs needed for that size.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your help&lt;/P&gt;</description>
    <pubDate>Wed, 02 Aug 2017 18:19:36 GMT</pubDate>
    <dc:creator>isrsol702</dc:creator>
    <dc:date>2017-08-02T18:19:36Z</dc:date>
    <item>
      <title>Extract attributes in numerical order</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/extract-attributes-in-numerical-order/m-p/7266055#M117010</link>
      <description>&lt;P&gt;Hello Everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need help extracting fractional number in numerical order. as reference, we use a number plus this symbol ~ followed by one of these numbers or symbols "1" "2" "3" "4" "5" "6" "7" "8" "9" "0" " "/" "\"" "q" "w" "e" "r" "t" to denote 1/16" increments. E.g 5~1 = 5 1/16" or 5~2 = 5 1/8" and so on, Thank you for your help. (I'm not an expert on lisp routines, I just self&amp;nbsp;&lt;SPAN&gt;taught enough to do small tweaks)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;here is the actual lisp&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(defun c:chairbom ()&lt;BR /&gt;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;(setq scalelist '(192.0 128.0 96.0 72.0 48.0 36.0 24.0 16.0 12.0 8.0 1270.0 2540.0 3810.0 5080.0 6350.0 7620.0 8890.0 10160.0 11430.0 12700.0))&lt;BR /&gt;&amp;nbsp;&amp;nbsp; ;PROGRAM TO READ ATTRIBUTE FILE (C:\ACADWIN\PT\CHAIRBOM.TXT)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; ;AND TO WRITE A CHAIR BILL-OF-MATERIALS BACK TO DRAWING&lt;BR /&gt;(setvar "CMDECHO" 0)&lt;BR /&gt;&lt;BR /&gt;;EXTRACT ATTRIBUTES&lt;BR /&gt;(setvar "FILEDIA" 0)&lt;BR /&gt;(command "attext" "" "c:\\apps\\PT_CAD\\bom\\chairtem.txt"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "c:\\chairbom.txt")&lt;BR /&gt;(prompt "Please wait for processing of attributes")(terpri)&lt;BR /&gt;(setvar "FILEDIA" 1)&lt;BR /&gt;(prompt "Please wait")(terpri)&lt;BR /&gt;&lt;BR /&gt;(setq a (open "c:\\chairbom.txt" "r"))&lt;BR /&gt;(setq charlist&lt;BR /&gt;&amp;nbsp;&amp;nbsp; '("1" "2" "3" "4" "5" "6" "7" "8" "9" "0" "~" "/" "\"" "q" "w" "e" "r" "t"))&lt;BR /&gt;(setq scale (getvar "dimscale"))&lt;BR /&gt;(if (not (member scale scalelist))&lt;BR /&gt;&amp;nbsp;&amp;nbsp; (progn&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (setq scale (getreal "Enter scale factor - 96 for 1/8\", 128 for 3/32\", 192 for 1/16\" [SCALE FACTOR X 25.4 FOR METRIC]: "))&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (setvar "dimscale" scale)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; )&lt;BR /&gt;)&lt;BR /&gt;(if (= (cdr (assoc '40 (tblsearch "style" (getvar "textstyle")))) 0.0)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; (command "style" "ROMANS" "ROMANS.shx,SPECIAL.shx" (/ (getvar "dimscale") 8.0) 0.9 0 "N" "N" "N") &amp;nbsp;&lt;BR /&gt;)&lt;BR /&gt;(setq chrhts '())&lt;BR /&gt;(setq alist '())&lt;BR /&gt;(listatt)&lt;BR /&gt;(close a)&lt;BR /&gt;(setq sp (getpoint "Pick starting point for chair schedule: "))&lt;BR /&gt;(printatt (length slist) 0 sp)&lt;BR /&gt;(setvar "CMDECHO" 1)&lt;BR /&gt;(if (/= omo nil)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; (setvar "osmode" omo)&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;(defun listatt ()&lt;BR /&gt;&amp;nbsp;&amp;nbsp; (while (setq l (read-line a)) &amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (setq cl (proline l 1 nil nil ""))&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (setq lastc (substr (car cl) (strlen (car cl)) 1))&lt;BR /&gt;&lt;BR /&gt;;;;;;;;;;;;&amp;nbsp; REVISION TO PROGRAM ON 2/22/99 TO HANDLE NO QUANTITY CALLOUT IN MULT. CHAIR BLOCK ;;;;;;;&lt;BR /&gt;;;;;;;;;;;&amp;nbsp;&amp;nbsp;&amp;nbsp; AND TO CONSOLIDATE CALLOUTS W/ AND W/O INCH MARKS ;;;;;;;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (if (/= lastc "\"")&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (progn&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; (setq htinch (strcat (car cl) "\""))&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; (setq cl (list htinch (cadr cl)))&lt;BR /&gt;&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; )&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (if (= (cadr cl) 0)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;IF QUANTITY IS 0 THEN CHAIR CALLOUT QUANTITY IS TWO&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (setq cl (subst 2 0 cl))&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;;;;;;; END REVISION ;;;;;;;;;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (if (not (member (car cl) chrhts))&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (progn&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; (setq chrhts (cons (car cl) chrhts))&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; (setq alist (cons cl alist))&lt;BR /&gt;&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; (progn&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; (setq old (assoc (car cl) alist))&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; (setq new (append old (cdr cl)))&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; (setq alist (subst new old alist))&lt;BR /&gt;&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; )&lt;BR /&gt;&amp;nbsp;&amp;nbsp; )&lt;BR /&gt;&amp;nbsp;&amp;nbsp; (setq slist '())&lt;BR /&gt;&amp;nbsp;&amp;nbsp; (foreach x alist&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (setq slist (cons (list (car x) (apply '+ (cdr x))) slist)))&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;(defun proline (l cn 2f h n / hnl cc )&lt;BR /&gt;&amp;nbsp;&amp;nbsp; (setq cc (substr l cn 1)) &amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; (cond ((= cn (1+ (strlen l)))&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (setq hnl (list h (atoi n)))&lt;BR /&gt;&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; ((and (member cc charlist) (not 2f))&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (if (= h nil)&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; (setq h cc)&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; (setq h (strcat h cc))&lt;BR /&gt;&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; (proline l (1+ cn) nil h n)&lt;BR /&gt;&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; ((= cc ",") (proline l (1+ cn) T h n))&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ((and (member cc charlist) 2f)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (if (= n "")&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; (setq n cc)&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; (setq n (strcat n cc))&lt;BR /&gt;&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; (proline l (1+ cn) T h n)&lt;BR /&gt;&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; (T (proline l (1+ cn) 2f h n))&lt;BR /&gt;&amp;nbsp;&amp;nbsp; )&lt;BR /&gt;)&lt;BR /&gt;(defun printatt (n i sp)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; (setq l (car (nth i slist)))&lt;BR /&gt;&amp;nbsp;&amp;nbsp; (command "text" sp 0 l)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; (setq l (itoa (cadr (nth i slist))))&lt;BR /&gt;&amp;nbsp;&amp;nbsp; (setq np (list (+ (car sp) (* scale 0.75)) (cadr sp)))&lt;BR /&gt;&amp;nbsp;&amp;nbsp; (command "text" np 0 l)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; (setq sp (list (car sp) (- (cadr sp) (/ scale 3))))&lt;BR /&gt;&amp;nbsp;&amp;nbsp; (setq i (1+ i))&lt;BR /&gt;&amp;nbsp;&amp;nbsp; (if (&amp;lt; i n) (printatt n i sp))&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jul 2017 16:08:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/extract-attributes-in-numerical-order/m-p/7266055#M117010</guid>
      <dc:creator>isrsol702</dc:creator>
      <dc:date>2017-07-31T16:08:37Z</dc:date>
    </item>
    <item>
      <title>Re: Extract attributes in numerical order</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/extract-attributes-in-numerical-order/m-p/7270442#M117011</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3961421"&gt;@isrsol702&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I need help extracting fractional number in numerical order. as reference, we use a number plus this symbol ~...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I get what you mean by &lt;STRONG&gt;extracting,&lt;/STRONG&gt; but not clear about &lt;STRONG&gt;numerical order&lt;/STRONG&gt;, can you explain more about the latter&amp;nbsp;&lt;SPAN&gt;isrsol702&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Aug 2017 08:01:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/extract-attributes-in-numerical-order/m-p/7270442#M117011</guid>
      <dc:creator>pbejse</dc:creator>
      <dc:date>2017-08-02T08:01:01Z</dc:date>
    </item>
    <item>
      <title>Re: Extract attributes in numerical order</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/extract-attributes-in-numerical-order/m-p/7272148#M117012</link>
      <description>&lt;P&gt;Hi &lt;SPAN&gt;&lt;A href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/564264" target="_self"&gt;&lt;SPAN&gt;pbejse&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;when I run this lisp, it will spit all the numbers but it will not do it in numerical order E.g.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;1 1/4"&lt;/P&gt;&lt;P&gt;1 1/2"&lt;/P&gt;&lt;P&gt;1 3/4"&lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;2 1/4"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;see the pic attached. the row of numbers on the left are the symbols we use as a short cut to enter fractional numbers. the row of numbers on the right are the numbers who's fonts were corrected to show the fraction number properly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, just to be clear,&amp;nbsp; in each row you can see two sets of number E.g.&amp;nbsp; 3~4 1497 = 3 1/4" 1497&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3 1/4" refers to the chair size&lt;/P&gt;&lt;P&gt;1497 refers to the number of chairs needed for that size.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your help&lt;/P&gt;</description>
      <pubDate>Wed, 02 Aug 2017 18:19:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/extract-attributes-in-numerical-order/m-p/7272148#M117012</guid>
      <dc:creator>isrsol702</dc:creator>
      <dc:date>2017-08-02T18:19:36Z</dc:date>
    </item>
    <item>
      <title>Re: Extract attributes in numerical order</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/extract-attributes-in-numerical-order/m-p/7272185#M117013</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3961421"&gt;@isrsol702&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hi &lt;SPAN&gt;&lt;A href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/564264" target="_self"&gt;&lt;SPAN&gt;pbejse&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;when I run this lisp, it will spit all the numbers but it will not do it in numerical order E.g.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1&lt;/P&gt;
&lt;P&gt;1 1/4"&lt;/P&gt;
&lt;P&gt;1 1/2"&lt;/P&gt;
&lt;P&gt;1 3/4"&lt;/P&gt;
&lt;P&gt;2&lt;/P&gt;
&lt;P&gt;2 1/4"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Pardon my ignorance on fractions, so what it the correct order the&amp;nbsp;of the above list?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Aug 2017 18:30:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/extract-attributes-in-numerical-order/m-p/7272185#M117013</guid>
      <dc:creator>pbejse</dc:creator>
      <dc:date>2017-08-02T18:30:53Z</dc:date>
    </item>
    <item>
      <title>Re: Extract attributes in numerical order</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/extract-attributes-in-numerical-order/m-p/7272222#M117014</link>
      <description>&lt;P&gt;When I run the lisp, it will produce a list of chairs, much like in the picture I attached on my last reply, the list is created in a scramble fashion. I would like for the lisp to produce the list with the chair sizes in numerical order.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;E.g. This is how the lisp will produce the chair list&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;5 1/4"&lt;/P&gt;&lt;P&gt;6 1/2"&lt;/P&gt;&lt;P&gt;3 3/4"&lt;/P&gt;&lt;P&gt;2 1/2"&lt;/P&gt;&lt;P&gt;and so on&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need them to come in the following order&lt;/P&gt;&lt;P&gt;2 1/2"&lt;/P&gt;&lt;P&gt;3 3/4"&lt;/P&gt;&lt;P&gt;5 1/4"&lt;/P&gt;&lt;P&gt;6 1/2"&lt;/P&gt;&lt;P&gt;and so on&lt;/P&gt;</description>
      <pubDate>Wed, 02 Aug 2017 18:39:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/extract-attributes-in-numerical-order/m-p/7272222#M117014</guid>
      <dc:creator>isrsol702</dc:creator>
      <dc:date>2017-08-02T18:39:11Z</dc:date>
    </item>
    <item>
      <title>Re: Extract attributes in numerical order</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/extract-attributes-in-numerical-order/m-p/7272287#M117015</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3961421"&gt;@isrsol702&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;When I run the lisp, it will produce a list of chairs, much like in the picture I attached on my last reply, the list is created in a scramble fashion. I would like for the lisp to produce the list with the chair sizes in numerical order.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;E.g. This is how the lisp will produce the chair list&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;5 1/4"&lt;/P&gt;
&lt;P&gt;6 1/2"&lt;/P&gt;
&lt;P&gt;3 3/4"&lt;/P&gt;
&lt;P&gt;2 1/2"&lt;/P&gt;
&lt;P&gt;and so on&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I need them to come in the following order&lt;/P&gt;
&lt;P&gt;2 1/2"&lt;/P&gt;
&lt;P&gt;3 3/4"&lt;/P&gt;
&lt;P&gt;5 1/4"&lt;/P&gt;
&lt;P&gt;6 1/2"&lt;/P&gt;
&lt;P&gt;and so on&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;It looks &amp;amp; sounds easy, It's just that the code you posted is confusing the bejesus out of me.&amp;nbsp;&lt;img id="smileyvery-happy" class="emoticon emoticon-smileyvery-happy" src="https://forums.autodesk.com/i/smilies/16x16_smiley-very-happy.png" alt="Smiley Very Happy" title="Smiley Very Happy" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To simplify, give me the fraction equivalent of this list and its order.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(setq charlist '("1" "2" "3" "4" "5" "6" "7" "8" "9" "0" "~" "/" "\"" "q" "w" "e" "r" "t"))&lt;/PRE&gt;
&lt;P&gt;This way&amp;nbsp;there'll be no need for a new code, variable&amp;nbsp;&lt;EM&gt;slist&lt;/EM&gt;&amp;nbsp;will be sorted before it comes out of&amp;nbsp;&lt;EM&gt;listatt&amp;nbsp;&lt;/EM&gt;function&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;Hang on, isn't &lt;EM&gt;&amp;nbsp;acad_strlsort&lt;/EM&gt; function enough for&amp;nbsp;your requirements?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;or one of the two&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(foreach x (vl-sort alist '(lambda (a b) (&lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;&amp;lt;&lt;/STRONG&gt;&lt;/FONT&gt; (Car a)(car b))))
      (setq slist (cons (list (car x) (apply '+ (cdr x))) slist)))&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;(foreach x (vl-sort alist '(lambda (a b) (&lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;&amp;gt;&lt;/STRONG&gt;&lt;/FONT&gt; (Car a)(car b))))&lt;BR /&gt; (setq slist (cons (list (car x) (apply '+ (cdr x))) slist)))&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Aug 2017 19:10:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/extract-attributes-in-numerical-order/m-p/7272287#M117015</guid>
      <dc:creator>pbejse</dc:creator>
      <dc:date>2017-08-02T19:10:22Z</dc:date>
    </item>
    <item>
      <title>Re: Extract attributes in numerical order</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/extract-attributes-in-numerical-order/m-p/7272333#M117016</link>
      <description>&lt;PRE&gt;(setq charlist '("1" "2" "3" "4" "5" "6" "7" "8" "9" "0" "~" "/" "\"" "q" "w" "e" "r" "t")&lt;/PRE&gt;&lt;P&gt;1 = 1/16&lt;/P&gt;&lt;P&gt;2 = 1/8&lt;/P&gt;&lt;P&gt;3 = 3/16&lt;/P&gt;&lt;P&gt;4 = 1/4&lt;/P&gt;&lt;P&gt;5 = 5/16&lt;/P&gt;&lt;P&gt;6 = 3/8&lt;/P&gt;&lt;P&gt;7 = 7/16&lt;/P&gt;&lt;P&gt;8 = 1/2&lt;/P&gt;&lt;P&gt;9 = 9/16&lt;/P&gt;&lt;P&gt;10 = 5/8&lt;/P&gt;&lt;P&gt;q = 11/16&lt;/P&gt;&lt;P&gt;w = 3/4&lt;/P&gt;&lt;P&gt;r = 7/8&lt;/P&gt;&lt;P&gt;t = 15/16&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;may be those code you gave me will work, but where exactly in the lisp routine would I insert them to try them.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Aug 2017 19:17:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/extract-attributes-in-numerical-order/m-p/7272333#M117016</guid>
      <dc:creator>isrsol702</dc:creator>
      <dc:date>2017-08-02T19:17:17Z</dc:date>
    </item>
    <item>
      <title>Re: Extract attributes in numerical order</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/extract-attributes-in-numerical-order/m-p/7272363#M117017</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;isrsol702 wrote:
&lt;P&gt;......may be those code you gave me will work, but where exactly in the lisp routine would I insert them to try them.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Unfortunately, it's not going to give&amp;nbsp;the correct order, I just tried it. Don't worry, I'll&amp;nbsp;modify your code if&amp;nbsp;you don't&amp;nbsp;get a solution by tomorrow morning, But &amp;nbsp;I'm sure it will be sorted by then&amp;nbsp;&lt;img id="smileyvery-happy" class="emoticon emoticon-smileyvery-happy" src="https://forums.autodesk.com/i/smilies/16x16_smiley-very-happy.png" alt="Smiley Very Happy" title="Smiley Very Happy" /&gt; You're in good hands here.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And that list you just posted will help a lot, I can see it now.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hang in there... any minute now....&amp;nbsp;&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;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;signing-off&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Aug 2017 19:26:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/extract-attributes-in-numerical-order/m-p/7272363#M117017</guid>
      <dc:creator>pbejse</dc:creator>
      <dc:date>2017-08-02T19:26:39Z</dc:date>
    </item>
    <item>
      <title>Re: Extract attributes in numerical order</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/extract-attributes-in-numerical-order/m-p/7273605#M117018</link>
      <description>&lt;BLOCKQUOTE&gt;Not really sure without running your code, &amp;nbsp;assuming&amp;nbsp;alist variable look something like this
&lt;P class="1501751545184"&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;'(("1 1/16" 12 36 854 695)
              ("2 1/8" 23 85 854 3 15)
              ("2 3/16" 23 85 854 3 15)
              ("1/4" 23 85 854 3 15)
              ("5/16" 23 85 854 3 15)
              ("3/8" 23 85 854 3 15)
              ("7/16" 23 85 854 3 15)
              ("1/2" 23 85 854 3 15)
              ("1 9/16" 23 85 854 3 15)
              ("5/8" 23 85 854 3 15)
              ("5 11/16" 23 85 854 3 15)
              ("3/4" 23 85 854 3 15)
              ("7/8" 23 85 854 3 15)
              ("15/16" 23 85 854 3 15)
              )&lt;/PRE&gt;
&lt;P class="1501751545184"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="1501751325021"&gt;Then this should work&lt;/P&gt;
&lt;P class="1501751325021"&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(defun listatt ()
   (while (setq l (read-line a))  
      (setq cl (proline l 1 nil nil ""))
&lt;BR /&gt;..........
   (setq slist '())
   (foreach x  &lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;(vl-sort
                alist
                '(lambda (a b) (&amp;gt; (distof (Car a)) (distof (car b)))))&lt;/STRONG&gt;&lt;/FONT&gt;

      (setq slist (cons (list (car x) (apply '+ (cdr x))) slist))
      )
)&lt;/PRE&gt;
&lt;P class="1501751325021"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="1501751325021"&gt;&lt;EM&gt;if not, we may need to modify &amp;nbsp;your codes' conversion from ~4 &amp;nbsp;to fraction format the way distoff can understand.&lt;/EM&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;HTH&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Aug 2017 09:43:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/extract-attributes-in-numerical-order/m-p/7273605#M117018</guid>
      <dc:creator>pbejse</dc:creator>
      <dc:date>2017-08-03T09:43:20Z</dc:date>
    </item>
  </channel>
</rss>

