<?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 Extract parts of material name and populate iProperties in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/extract-parts-of-material-name-and-populate-iproperties/m-p/6727358#M68394</link>
    <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;4718800 GLV ZAM 1.6mm(16Ga)PLT &amp;nbsp; 11H8376M5PZ&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is what my material name looks like, I want to extract the first&amp;nbsp;"&lt;STRONG&gt;4718800&lt;/STRONG&gt;" and the last "&lt;STRONG&gt;11H8376M5PZ&lt;/STRONG&gt;"&lt;/P&gt;&lt;P&gt;I want to know how to write my code so that it reads the name from the left and right up until&amp;nbsp;there is a space. "&lt;STRONG&gt;4718800&lt;/STRONG&gt;" should then be populated in the iProperties under "&lt;STRONG&gt;Custom&lt;/STRONG&gt;" tab and "&lt;STRONG&gt;AREA"&lt;/STRONG&gt;. and the "&lt;STRONG&gt;11H8376M5PZ&lt;/STRONG&gt;" to be populated under the iProperties "&lt;STRONG&gt;Project&lt;/STRONG&gt;" , "&lt;STRONG&gt;Stock Number&lt;/STRONG&gt;"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can do a code that counts a number of spaces and the uses that but, I would like it to read just till space and the use that as not all of the names are the same lengths.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone help me, please?&lt;/P&gt;</description>
    <pubDate>Mon, 05 Dec 2016 08:11:35 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-12-05T08:11:35Z</dc:date>
    <item>
      <title>Extract parts of material name and populate iProperties</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/extract-parts-of-material-name-and-populate-iproperties/m-p/6727358#M68394</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;4718800 GLV ZAM 1.6mm(16Ga)PLT &amp;nbsp; 11H8376M5PZ&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is what my material name looks like, I want to extract the first&amp;nbsp;"&lt;STRONG&gt;4718800&lt;/STRONG&gt;" and the last "&lt;STRONG&gt;11H8376M5PZ&lt;/STRONG&gt;"&lt;/P&gt;&lt;P&gt;I want to know how to write my code so that it reads the name from the left and right up until&amp;nbsp;there is a space. "&lt;STRONG&gt;4718800&lt;/STRONG&gt;" should then be populated in the iProperties under "&lt;STRONG&gt;Custom&lt;/STRONG&gt;" tab and "&lt;STRONG&gt;AREA"&lt;/STRONG&gt;. and the "&lt;STRONG&gt;11H8376M5PZ&lt;/STRONG&gt;" to be populated under the iProperties "&lt;STRONG&gt;Project&lt;/STRONG&gt;" , "&lt;STRONG&gt;Stock Number&lt;/STRONG&gt;"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can do a code that counts a number of spaces and the uses that but, I would like it to read just till space and the use that as not all of the names are the same lengths.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone help me, please?&lt;/P&gt;</description>
      <pubDate>Mon, 05 Dec 2016 08:11:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/extract-parts-of-material-name-and-populate-iproperties/m-p/6727358#M68394</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-12-05T08:11:35Z</dc:date>
    </item>
    <item>
      <title>Re: Extract parts of material name and populate iProperties</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/extract-parts-of-material-name-and-populate-iproperties/m-p/6729079#M68420</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You could use split to do it, but the number of parts must be the same - in your case below it would be 5.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you can count the number of spaces, i'm sure you could modify it so it works if the number is different.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyway it goes like this..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MatSplit&amp;nbsp;= Split(MaterialName, " ")&lt;BR /&gt;For i = 0 To UBound(&lt;SPAN&gt;MatSplit&lt;/SPAN&gt;)&lt;BR /&gt;Part1 = &lt;SPAN&gt;MatSplit&lt;/SPAN&gt;(0)&lt;BR /&gt;Part2 = &lt;SPAN&gt;MatSplit&lt;/SPAN&gt;(1)&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Part3 = &lt;/SPAN&gt;&lt;SPAN&gt;MatSplit&lt;/SPAN&gt;&lt;SPAN&gt;(2)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Part4 = &lt;/SPAN&gt;&lt;SPAN&gt;MatSplit&lt;/SPAN&gt;&lt;SPAN&gt;(3)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Part5 = &lt;/SPAN&gt;&lt;SPAN&gt;MatSplit&lt;/SPAN&gt;&lt;SPAN&gt;(4)&lt;/SPAN&gt;&lt;BR /&gt;Next&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope that helps you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dean.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Dec 2016 21:32:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/extract-parts-of-material-name-and-populate-iproperties/m-p/6729079#M68420</guid>
      <dc:creator>dean.morrison</dc:creator>
      <dc:date>2016-12-05T21:32:11Z</dc:date>
    </item>
  </channel>
</rss>

