<?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 figuring out SUBSTR codes in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/figuring-out-substr-codes/m-p/5460074#M145078</link>
    <description>&lt;P&gt;Good morning all.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm working on someone else's code (they no longer work here) and trying to figure out what he has done with a SUBSTR code to filter out certain text.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've spent way too much time trying to figure this out and could really use a good eye to help me learn what is going on.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the code:&lt;/P&gt;&lt;P&gt;takes text from an attribute, strips certain key words and assigns a weight to it. &amp;nbsp;EG. looks for a size of 1" and gives it a weight of 10 kgs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the problem:&lt;/P&gt;&lt;P&gt;the text order has changed a bit and now the code does not work 100%. &amp;nbsp;it no longer recognizes 1/2" increments. &amp;nbsp;IE. it will recognize 1-1/2" but not 1 1/2". &amp;nbsp;it thinks 1 1/2" is actually 1/2" and assigns the 1/2" weight to it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the NEW text would read something like this:&lt;/P&gt;&lt;P&gt;%%c2 1/2" x 20' (%%c64mm x 7.6m) SLING&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the OLD text would read:&amp;nbsp;&lt;/P&gt;&lt;P&gt;20' x 2 1/2"%%c (7.6m x 64mm%%c) SLING&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've stripped the code down, as its quite long, and added some notes. &amp;nbsp;as well uploaded a dwg of the blocks we are using.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if anyone could help me decipher whats going on it would be much appreciated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thankyou&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 06 Jan 2015 16:11:03 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-01-06T16:11:03Z</dc:date>
    <item>
      <title>figuring out SUBSTR codes</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/figuring-out-substr-codes/m-p/5460074#M145078</link>
      <description>&lt;P&gt;Good morning all.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm working on someone else's code (they no longer work here) and trying to figure out what he has done with a SUBSTR code to filter out certain text.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've spent way too much time trying to figure this out and could really use a good eye to help me learn what is going on.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the code:&lt;/P&gt;&lt;P&gt;takes text from an attribute, strips certain key words and assigns a weight to it. &amp;nbsp;EG. looks for a size of 1" and gives it a weight of 10 kgs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the problem:&lt;/P&gt;&lt;P&gt;the text order has changed a bit and now the code does not work 100%. &amp;nbsp;it no longer recognizes 1/2" increments. &amp;nbsp;IE. it will recognize 1-1/2" but not 1 1/2". &amp;nbsp;it thinks 1 1/2" is actually 1/2" and assigns the 1/2" weight to it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the NEW text would read something like this:&lt;/P&gt;&lt;P&gt;%%c2 1/2" x 20' (%%c64mm x 7.6m) SLING&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the OLD text would read:&amp;nbsp;&lt;/P&gt;&lt;P&gt;20' x 2 1/2"%%c (7.6m x 64mm%%c) SLING&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've stripped the code down, as its quite long, and added some notes. &amp;nbsp;as well uploaded a dwg of the blocks we are using.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if anyone could help me decipher whats going on it would be much appreciated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thankyou&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jan 2015 16:11:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/figuring-out-substr-codes/m-p/5460074#M145078</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-01-06T16:11:03Z</dc:date>
    </item>
  </channel>
</rss>

