<?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 Betreff: How to determine the &amp;quot;form factor&amp;quot; of a part in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-determine-the-quot-form-factor-quot-of-a-part/m-p/10251223#M123463</link>
    <description>&lt;P&gt;So, I am in the process of implementing this. So far,&amp;nbsp; the two codes above are working fine, for parts where my custom iProperty "Form Factor" exists...however, when I open a file without that iProperty, i get an error. Is there quick code that checks the part and says if, iProperties.Value("Custom", "Form Factor") then create it? I only use this in .ipt files, no .iams, .idws, or .ipns&lt;/P&gt;</description>
    <pubDate>Mon, 19 Apr 2021 17:28:08 GMT</pubDate>
    <dc:creator>RNDinov8r</dc:creator>
    <dc:date>2021-04-19T17:28:08Z</dc:date>
    <item>
      <title>How to determine the "form factor" of a part</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-determine-the-quot-form-factor-quot-of-a-part/m-p/10242283#M123368</link>
      <description>&lt;P&gt;So, I have been able to create a method, using the metadata that iPropWiz spits out, to determine the raw stock size of all the material of the custom parts on our machines. iPropWiz spits out the extents box of each and every part created. The intent is to use the qty and size info to generate a list to send to our material vendors. All of that to say, how do I determine if a part is round? I know that if a part has two identical dimensions, it could be round, say x&amp;amp;y or x&amp;amp;z are 20&amp;nbsp; and 20 mm each, it coudl be round. I flag those parts and the job will verify if the part is truly made from round stock.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I havent' been able to easily determine is what aobut a shaft that is a "D" shaft, (some flat all along the length, such that it's made from say Ø20mm material, with 1mm removed from one side ). Or a shaft that has a continuous keyway...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If these were short peices and only one or two each req'd this wouldn't be a big deal, but if I have to make say, 5 D shafts at 24" long from 316 SS (Ø25mm) and I order square stock instead, that's an expensive mistake.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;All that to say, is there an easy (or not easy) way to maybe have an iLogic code run "on save" that writes to an iProperty that actually says the part is round.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At this point, I am just lookign for methods, not necessarily even code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I had thought of creating a template that HAS to be used for round parts, such that it's iProprty of, say, "Round Stock" was always set to yes, while parts made from the normal template would be set to "no". However, now I have to rely on 6-7 engineers always remember to use the correct template for "round" parts...&lt;/P&gt;</description>
      <pubDate>Thu, 15 Apr 2021 20:12:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-determine-the-quot-form-factor-quot-of-a-part/m-p/10242283#M123368</guid>
      <dc:creator>RNDinov8r</dc:creator>
      <dc:date>2021-04-15T20:12:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine the "form factor" of a part</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-determine-the-quot-form-factor-quot-of-a-part/m-p/10242907#M123372</link>
      <description>&lt;P&gt;1&amp;nbsp; add a rule in your template with below snippets&lt;/P&gt;&lt;P&gt;2&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;specify it to run on "Save"&amp;nbsp; event&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Dim StockType_Eum As String = MessageBox.Show("Is this part a round Part？", "Round Stock Info",MessageBoxButtons.YesNo)
If StockType_Eum = vbYes Then
	iProperties.Value("Custom", "Round Stock") ="True"
Else
	iProperties.Value("Custom", "Round Stock") ="False"
End If&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 16 Apr 2021 02:44:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-determine-the-quot-form-factor-quot-of-a-part/m-p/10242907#M123372</guid>
      <dc:creator>Stakin</dc:creator>
      <dc:date>2021-04-16T02:44:05Z</dc:date>
    </item>
    <item>
      <title>Betreff: How to determine the "form factor" of a part</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-determine-the-quot-form-factor-quot-of-a-part/m-p/10243071#M123379</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This would mean you see on every save of every part this Messagebox. Really?&lt;/P&gt;&lt;P&gt;If you think of using this way, add minimum a check like&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;If ThisDoc.Document.FullDocumentname ="" Then
    'your messagebox
End If&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;FullDocumentName is empty only before first save. Another option could be to check if property not exist prior the Messagebox.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Apr 2021 05:37:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-determine-the-quot-form-factor-quot-of-a-part/m-p/10243071#M123379</guid>
      <dc:creator>Ralf_Krieg</dc:creator>
      <dc:date>2021-04-16T05:37:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine the "form factor" of a part</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-determine-the-quot-form-factor-quot-of-a-part/m-p/10243083#M123380</link>
      <description>&lt;P&gt;That is a big ask for automation but relatively easy for humans to decide. You could leverage a list based custom property in your iPropWiz configuration that has all the possible types you might want to use. Making the property required would ensure that users fill in this information. Ping me if you would like to discuss it further.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Neil&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Apr 2021 05:46:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-determine-the-quot-form-factor-quot-of-a-part/m-p/10243083#M123380</guid>
      <dc:creator>nmunro</dc:creator>
      <dc:date>2021-04-16T05:46:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine the "form factor" of a part</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-determine-the-quot-form-factor-quot-of-a-part/m-p/10244130#M123396</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/564136"&gt;@Ralf_Krieg&lt;/a&gt;&amp;nbsp; &amp;amp;&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/925138"&gt;@Stakin&lt;/a&gt;&amp;nbsp;:&amp;nbsp;So, After I posted this, I was talking to another engineer internally about this, and ultimately this solution came up organically in our discussion. Fire off a message box on save that will prompt the engineer to verify the "form factor". And with that second bit of code, it looks like it would basically fire once per part...once the result is set, it won't ask again. The nice thing about this, is I can use this on "legacy" parts, so if I use a part created 2 or even 6 years ago, I can still handle it. WE are going to be releasing a pretty massive job in about a month, so the intent is to have this ready for that release. Saving my machine shop 2-4 days of raw material sizing/procurement is a huge time saver.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/35568"&gt;@nmunro&lt;/a&gt;&amp;nbsp;Neil, that's a good point. That would allow me to differentiate between "Round Stock", "Normal", and "Sheetmetal". Between form factors and our part numbering system, I can sort exactly what the machine shop needs.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Apr 2021 12:36:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-determine-the-quot-form-factor-quot-of-a-part/m-p/10244130#M123396</guid>
      <dc:creator>RNDinov8r</dc:creator>
      <dc:date>2021-04-16T12:36:47Z</dc:date>
    </item>
    <item>
      <title>Betreff: How to determine the "form factor" of a part</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-determine-the-quot-form-factor-quot-of-a-part/m-p/10251223#M123463</link>
      <description>&lt;P&gt;So, I am in the process of implementing this. So far,&amp;nbsp; the two codes above are working fine, for parts where my custom iProperty "Form Factor" exists...however, when I open a file without that iProperty, i get an error. Is there quick code that checks the part and says if, iProperties.Value("Custom", "Form Factor") then create it? I only use this in .ipt files, no .iams, .idws, or .ipns&lt;/P&gt;</description>
      <pubDate>Mon, 19 Apr 2021 17:28:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-determine-the-quot-form-factor-quot-of-a-part/m-p/10251223#M123463</guid>
      <dc:creator>RNDinov8r</dc:creator>
      <dc:date>2021-04-19T17:28:08Z</dc:date>
    </item>
    <item>
      <title>Betreff: How to determine the "form factor" of a part</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-determine-the-quot-form-factor-quot-of-a-part/m-p/10251842#M123473</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A basic test and create&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Dim iProp As Inventor.Property
For Each iProp In ThisDoc.Document.PropertySets("{D5CDD505-2E9C-101B-9397-08002B2CF9AE}")
	If iProp.Name = "Form Factor" Then Exit For
Next

If iProp Is Nothing Then
	iProperties.Value("Custom", "Form Factor") = "YOUR_INITIAL_VALUE"
End If&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Apr 2021 20:54:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-determine-the-quot-form-factor-quot-of-a-part/m-p/10251842#M123473</guid>
      <dc:creator>Ralf_Krieg</dc:creator>
      <dc:date>2021-04-19T20:54:05Z</dc:date>
    </item>
    <item>
      <title>Betreff: How to determine the "form factor" of a part</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-determine-the-quot-form-factor-quot-of-a-part/m-p/10251889#M123475</link>
      <description>&lt;P&gt;So here's what I have...I trigger on New and Open.&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;iProp&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Inventor&lt;/SPAN&gt;.&lt;SPAN&gt;Property&lt;/SPAN&gt;
&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;iProp&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt;.&lt;SPAN&gt;PropertySets&lt;/SPAN&gt;(&lt;SPAN&gt;"{D5CDD505-2E9C-101B-9397-08002B2CF9AE}"&lt;/SPAN&gt;)
	&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;iProp&lt;/SPAN&gt;.&lt;SPAN&gt;Name&lt;/SPAN&gt; = &lt;SPAN&gt;"Form Factor"&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt; &lt;SPAN&gt;Exit&lt;/SPAN&gt; &lt;SPAN&gt;For&lt;/SPAN&gt;
&lt;SPAN&gt;Next&lt;/SPAN&gt;

&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;iProp&lt;/SPAN&gt; &lt;SPAN&gt;Is&lt;/SPAN&gt; &lt;SPAN&gt;Nothing&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;
	&lt;SPAN&gt;iProperties&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;(&lt;SPAN&gt;"Custom"&lt;/SPAN&gt;, &lt;SPAN&gt;"Form Factor"&lt;/SPAN&gt;) = &lt;SPAN&gt;""&lt;/SPAN&gt;
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;

&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;iProperties&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;(&lt;SPAN&gt;"Custom"&lt;/SPAN&gt;, &lt;SPAN&gt;"Form Factor"&lt;/SPAN&gt;) = &lt;SPAN&gt;""&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;
	&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;FormFactor&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt; = &lt;SPAN&gt;MessageBox&lt;/SPAN&gt;.&lt;SPAN&gt;Show&lt;/SPAN&gt;(&lt;SPAN&gt;"Is this part a round Part？"&lt;/SPAN&gt;, &lt;SPAN&gt;"Round Stock Info"&lt;/SPAN&gt;, &lt;SPAN&gt;MessageBoxButtons&lt;/SPAN&gt;.&lt;SPAN&gt;YesNo&lt;/SPAN&gt;)
	&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;FormFactor&lt;/SPAN&gt; = &lt;SPAN&gt;vbYes&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;
		&lt;SPAN&gt;iProperties&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;(&lt;SPAN&gt;"Custom"&lt;/SPAN&gt;, &lt;SPAN&gt;"Form Factor"&lt;/SPAN&gt;) =&lt;SPAN&gt;"ROUND"&lt;/SPAN&gt;
	&lt;SPAN&gt;Else&lt;/SPAN&gt;
		&lt;SPAN&gt;iProperties&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;(&lt;SPAN&gt;"Custom"&lt;/SPAN&gt;, &lt;SPAN&gt;"Form Factor"&lt;/SPAN&gt;) =&lt;SPAN&gt;"SQUARE"&lt;/SPAN&gt;
	&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;So, from what I can tell, it's not creating the iProperty "fast enough" or there needs to be an updated before I run the second part of the code. The second part works well (tested), when parts do have the iProperty present.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Apr 2021 21:09:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-determine-the-quot-form-factor-quot-of-a-part/m-p/10251889#M123475</guid>
      <dc:creator>RNDinov8r</dc:creator>
      <dc:date>2021-04-19T21:09:35Z</dc:date>
    </item>
    <item>
      <title>Betreff: How to determine the "form factor" of a part</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-determine-the-quot-form-factor-quot-of-a-part/m-p/10251981#M123477</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tested it on open document trigger and it works as expected. Can you please try it with this alternative way of adding new iProp?&lt;/P&gt;&lt;P&gt;I assume there's no other rule running? Did you see an error message or does still nothing happen? Are you opening parts separat or are they placed/created in an assembly?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Dim iProp As Inventor.Property
For Each iProp In ThisDoc.Document.PropertySets("{D5CDD505-2E9C-101B-9397-08002B2CF9AE}")
	If iProp.Name = "Form Factor" Then Exit For
Next

If iProp Is Nothing Then
	'iProperties.Value("Custom", "Form Factor") = ""
	ThisDoc.Document.PropertySets("{D5CDD505-2E9C-101B-9397-08002B2CF9AE}").Add("","Form Factor")
End If

If iProperties.Value("Custom", "Form Factor") = "" Then
	Dim FormFactor As String = MessageBox.Show("Is this part a round Part？", "Round Stock Info", MessageBoxButtons.YesNo)
	If FormFactor = vbYes Then
		iProperties.Value("Custom", "Form Factor") ="ROUND"
	Else
		iProperties.Value("Custom", "Form Factor") ="SQUARE"
	End If
End If&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Apr 2021 22:06:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-determine-the-quot-form-factor-quot-of-a-part/m-p/10251981#M123477</guid>
      <dc:creator>Ralf_Krieg</dc:creator>
      <dc:date>2021-04-19T22:06:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine the "form factor" of a part</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-determine-the-quot-form-factor-quot-of-a-part/m-p/10252997#M123483</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3812613"&gt;@RNDinov8r&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;how do I determine if a part is round? I know that if a part has two identical dimensions, it could be round, say x&amp;amp;y or x&amp;amp;z are 20&amp;nbsp; and 20 mm each, it coudl be round.&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;As already mentioned, the easiest way is letting the user / creator of the part tell you it's a shaft by setting a custom property (our PLM system checks our parts / assemblies for the presence of certain properties before including them in its library).&lt;BR /&gt;&lt;BR /&gt;But when your code finds a cylindrical surface in the part, having the same diameter as the two identical dimensions, then the part is most probably (created from) a shaft. Mind that the cylindrical surface doesn't need to be fully closed (360°), so the flat section along the axis is no problem. And as soon as you have written the code that determines a shaft like this, someone will hand you a shaft for which the code doesn't work or a bar that passes it &lt;img class="lia-deferred-image lia-image-emoji" src="https://forums.autodesk.com/html/@6F93DBFC7E4AAABB1178AEAE8B835CA8/emoticons/1f61b.png" alt=":face_with_tongue:" title=":face_with_tongue:" /&gt; And then some fine tuning is required.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Apr 2021 09:33:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-determine-the-quot-form-factor-quot-of-a-part/m-p/10252997#M123483</guid>
      <dc:creator>_dscholtes_</dc:creator>
      <dc:date>2021-04-20T09:33:16Z</dc:date>
    </item>
    <item>
      <title>Betreff: How to determine the "form factor" of a part</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-determine-the-quot-form-factor-quot-of-a-part/m-p/10253385#M123487</link>
      <description>&lt;P&gt;This is my error upon running with a trigger "on open". And, I am just opening a part...not an assembly with parts missing the iProperty.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RNDinov8r_0-1618920482190.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/909127i5237449A3EB2575F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RNDinov8r_0-1618920482190.png" alt="RNDinov8r_0-1618920482190.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RNDinov8r_1-1618920495799.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/909128iBAE26EFC6471D834/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RNDinov8r_1-1618920495799.png" alt="RNDinov8r_1-1618920495799.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;And, if I run it after it opens...I still have the same issue...&lt;/P&gt;&lt;P&gt;WE don't use vault, so I know it's not a checked out part.&lt;/P&gt;&lt;P&gt;I even have "All Events Trigger" selected in my iLogic Security.&lt;/P&gt;&lt;P&gt;I have one rule running "after Save" that converts parts to STEP files, but since its not the same event, I can't see that would be an issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Apr 2021 12:12:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-determine-the-quot-form-factor-quot-of-a-part/m-p/10253385#M123487</guid>
      <dc:creator>RNDinov8r</dc:creator>
      <dc:date>2021-04-20T12:12:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine the "form factor" of a part</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-determine-the-quot-form-factor-quot-of-a-part/m-p/10253416#M123488</link>
      <description>&lt;P&gt;I even threw a pause in there..thinking it was running into the next instruction before the iProperty could be created....and even at 1 second (a billion years in computer time), I still get the same error.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;iProp&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Inventor&lt;/SPAN&gt;.&lt;SPAN&gt;Property&lt;/SPAN&gt;
&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;iProp&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt;.&lt;SPAN&gt;PropertySets&lt;/SPAN&gt;(&lt;SPAN&gt;"{D5CDD505-2E9C-101B-9397-08002B2CF9AE}"&lt;/SPAN&gt;)
	&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;iProp&lt;/SPAN&gt;.&lt;SPAN&gt;Name&lt;/SPAN&gt; = &lt;SPAN&gt;"Form Factor"&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt; &lt;SPAN&gt;Exit&lt;/SPAN&gt; &lt;SPAN&gt;For&lt;/SPAN&gt;
&lt;SPAN&gt;Next&lt;/SPAN&gt;

&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;iProp&lt;/SPAN&gt; &lt;SPAN&gt;Is&lt;/SPAN&gt; &lt;SPAN&gt;Nothing&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;
	&lt;SPAN&gt;'iProperties.Value("Custom", "Form Factor") = ""&lt;/SPAN&gt;
	&lt;SPAN&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt;.&lt;SPAN&gt;PropertySets&lt;/SPAN&gt;(&lt;SPAN&gt;"{D5CDD505-2E9C-101B-9397-08002B2CF9AE}"&lt;/SPAN&gt;).&lt;SPAN&gt;Add&lt;/SPAN&gt;(&lt;SPAN&gt;""&lt;/SPAN&gt;,&lt;SPAN&gt;"Form Factor"&lt;/SPAN&gt;)
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;

&lt;SPAN&gt;System&lt;/SPAN&gt;.&lt;SPAN&gt;Threading&lt;/SPAN&gt;.&lt;SPAN&gt;Thread&lt;/SPAN&gt;.&lt;SPAN&gt;CurrentThread&lt;/SPAN&gt;.&lt;SPAN&gt;Sleep&lt;/SPAN&gt;(1000)

&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;iProperties&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;(&lt;SPAN&gt;"Custom"&lt;/SPAN&gt;, &lt;SPAN&gt;"Form Factor"&lt;/SPAN&gt;) = &lt;SPAN&gt;""&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;
	&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;FormFactor&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt; = &lt;SPAN&gt;MessageBox&lt;/SPAN&gt;.&lt;SPAN&gt;Show&lt;/SPAN&gt;(&lt;SPAN&gt;"Is this part a round Part？"&lt;/SPAN&gt;, &lt;SPAN&gt;"Round Stock Info"&lt;/SPAN&gt;, &lt;SPAN&gt;MessageBoxButtons&lt;/SPAN&gt;.&lt;SPAN&gt;YesNo&lt;/SPAN&gt;)
	&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;FormFactor&lt;/SPAN&gt; = &lt;SPAN&gt;vbYes&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;
		&lt;SPAN&gt;iProperties&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;(&lt;SPAN&gt;"Custom"&lt;/SPAN&gt;, &lt;SPAN&gt;"Form Factor"&lt;/SPAN&gt;) =&lt;SPAN&gt;"ROUND"&lt;/SPAN&gt;
	&lt;SPAN&gt;Else&lt;/SPAN&gt;
		&lt;SPAN&gt;iProperties&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;(&lt;SPAN&gt;"Custom"&lt;/SPAN&gt;, &lt;SPAN&gt;"Form Factor"&lt;/SPAN&gt;) =&lt;SPAN&gt;"SQUARE"&lt;/SPAN&gt;
	&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 20 Apr 2021 12:24:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-determine-the-quot-form-factor-quot-of-a-part/m-p/10253416#M123488</guid>
      <dc:creator>RNDinov8r</dc:creator>
      <dc:date>2021-04-20T12:24:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine the "form factor" of a part</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-determine-the-quot-form-factor-quot-of-a-part/m-p/10253857#M123493</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3812613"&gt;@RNDinov8r&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Looks to me that you just need to change your logic here. We can just assume if it's not found the iProperty then we go straight to creating it. No need to add it as a blank and test for it's value in the same routine; that's likely your issue why it doesn't work; You need to update the document between creating the iProperty and testing for it's value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The below should work better for you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;ValueList&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;New&lt;/SPAN&gt; &lt;SPAN&gt;List&lt;/SPAN&gt;(&lt;SPAN&gt;Of&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt;)({&lt;SPAN&gt;"Round"&lt;/SPAN&gt;, &lt;SPAN&gt;"Square"&lt;/SPAN&gt;, &lt;SPAN&gt;"Other"&lt;/SPAN&gt; }) &lt;SPAN&gt;' Add more options here if needed&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;iPropVal&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt;

&lt;SPAN&gt;Try&lt;/SPAN&gt;
	&lt;SPAN&gt;'See if the iProperty exists currently&lt;/SPAN&gt;
	&lt;SPAN&gt;iPropVal&lt;/SPAN&gt; = &lt;SPAN&gt;iProperties&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;(&lt;SPAN&gt;"Custom"&lt;/SPAN&gt;, &lt;SPAN&gt;"Form Factor"&lt;/SPAN&gt;)
&lt;SPAN&gt;Catch&lt;/SPAN&gt; &lt;SPAN&gt;ex&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Exception&lt;/SPAN&gt;
	&lt;SPAN&gt;'It doesn't exists, so create it&lt;/SPAN&gt;
	&lt;SPAN&gt;iPropVal&lt;/SPAN&gt; = &lt;SPAN&gt;InputListBox&lt;/SPAN&gt;(&lt;SPAN&gt;"Prompt"&lt;/SPAN&gt;, &lt;SPAN&gt;ValueList&lt;/SPAN&gt;, &lt;SPAN&gt;ValueList&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(0), &lt;SPAN&gt;Title&lt;/SPAN&gt; := &lt;SPAN&gt;"iLogic"&lt;/SPAN&gt;, &lt;SPAN&gt;ListName&lt;/SPAN&gt; := &lt;SPAN&gt;"Form List"&lt;/SPAN&gt;)
	&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;iPropVal&lt;/SPAN&gt; &lt;SPAN&gt;Is&lt;/SPAN&gt; &lt;SPAN&gt;Nothing&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt; &lt;SPAN&gt;Return&lt;/SPAN&gt; &lt;SPAN&gt;' User closed form before selecting option&lt;/SPAN&gt;
	&lt;SPAN&gt;iProperties&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;(&lt;SPAN&gt;"Custom"&lt;/SPAN&gt;, &lt;SPAN&gt;"Form Factor"&lt;/SPAN&gt;) = &lt;SPAN&gt;iPropVal&lt;/SPAN&gt;
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;Try&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Apr 2021 14:40:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-determine-the-quot-form-factor-quot-of-a-part/m-p/10253857#M123493</guid>
      <dc:creator>lmc.engineering</dc:creator>
      <dc:date>2021-04-20T14:40:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine the "form factor" of a part</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-determine-the-quot-form-factor-quot-of-a-part/m-p/10254339#M123501</link>
      <description>&lt;P&gt;So, that was it... I needed it to fire on a new file creation, and had to prompt for input there as well, so I add thed last four lines...but this is what I needed. Thanks Guys!!!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;ValueList&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;New&lt;/SPAN&gt; &lt;SPAN&gt;List&lt;/SPAN&gt;(&lt;SPAN&gt;Of&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt;)({&lt;SPAN&gt;"ROUND"&lt;/SPAN&gt;, &lt;SPAN&gt;"SQUARE"&lt;/SPAN&gt;, &lt;SPAN&gt;"SHEET"&lt;/SPAN&gt;, &lt;SPAN&gt;"PURCHASED"&lt;/SPAN&gt; }) &lt;SPAN&gt;' Add more options here if needed&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;iPropVal&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt;

&lt;SPAN&gt;Try&lt;/SPAN&gt;
	&lt;SPAN&gt;'See if the iProperty exists currently&lt;/SPAN&gt;
	&lt;SPAN&gt;iPropVal&lt;/SPAN&gt; = &lt;SPAN&gt;iProperties&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;(&lt;SPAN&gt;"Custom"&lt;/SPAN&gt;, &lt;SPAN&gt;"Form Factor"&lt;/SPAN&gt;)
&lt;SPAN&gt;Catch&lt;/SPAN&gt; &lt;SPAN&gt;ex&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Exception&lt;/SPAN&gt;
	&lt;SPAN&gt;'It doesn't exists, so create it&lt;/SPAN&gt;
	&lt;SPAN&gt;iPropVal&lt;/SPAN&gt; = &lt;SPAN&gt;InputListBox&lt;/SPAN&gt;(&lt;SPAN&gt;"Prompt"&lt;/SPAN&gt;, &lt;SPAN&gt;ValueList&lt;/SPAN&gt;, &lt;SPAN&gt;ValueList&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(0), &lt;SPAN&gt;Title&lt;/SPAN&gt; := &lt;SPAN&gt;"iLogic"&lt;/SPAN&gt;, &lt;SPAN&gt;ListName&lt;/SPAN&gt; := &lt;SPAN&gt;"Form List"&lt;/SPAN&gt;)
	&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;iPropVal&lt;/SPAN&gt; &lt;SPAN&gt;Is&lt;/SPAN&gt; &lt;SPAN&gt;Nothing&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt; &lt;SPAN&gt;Return&lt;/SPAN&gt; &lt;SPAN&gt;' User closed form before selecting option&lt;/SPAN&gt;
	&lt;SPAN&gt;iProperties&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;(&lt;SPAN&gt;"Custom"&lt;/SPAN&gt;, &lt;SPAN&gt;"Form Factor"&lt;/SPAN&gt;) = &lt;SPAN&gt;iPropVal&lt;/SPAN&gt;
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;Try&lt;/SPAN&gt;

&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;iProperties&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;(&lt;SPAN&gt;"Custom"&lt;/SPAN&gt;, &lt;SPAN&gt;"Form Factor"&lt;/SPAN&gt;) = &lt;SPAN&gt;Nothing&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;
	&lt;SPAN&gt;iPropVal&lt;/SPAN&gt; = &lt;SPAN&gt;InputListBox&lt;/SPAN&gt;(&lt;SPAN&gt;"Prompt"&lt;/SPAN&gt;, &lt;SPAN&gt;ValueList&lt;/SPAN&gt;, &lt;SPAN&gt;ValueList&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(0), &lt;SPAN&gt;Title&lt;/SPAN&gt; := &lt;SPAN&gt;"iLogic"&lt;/SPAN&gt;, &lt;SPAN&gt;ListName&lt;/SPAN&gt; := &lt;SPAN&gt;"Form List"&lt;/SPAN&gt;)
	&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;iPropVal&lt;/SPAN&gt; &lt;SPAN&gt;Is&lt;/SPAN&gt; &lt;SPAN&gt;Nothing&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt; &lt;SPAN&gt;Return&lt;/SPAN&gt; &lt;SPAN&gt;' User closed form before selecting option&lt;/SPAN&gt;
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 20 Apr 2021 17:23:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-determine-the-quot-form-factor-quot-of-a-part/m-p/10254339#M123501</guid>
      <dc:creator>RNDinov8r</dc:creator>
      <dc:date>2021-04-20T17:23:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine the "form factor" of a part</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-determine-the-quot-form-factor-quot-of-a-part/m-p/10254619#M123509</link>
      <description>&lt;P&gt;Sorry, I realise now you want to lock the user in to answering without the option to back out by closing the form. I've added a rough and ready way to ensure an answer is selected instead of you having the additional four lines..&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;ValueList&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;New&lt;/SPAN&gt; &lt;SPAN&gt;List&lt;/SPAN&gt;(&lt;SPAN&gt;Of&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt;)({&lt;SPAN&gt;"ROUND"&lt;/SPAN&gt;, &lt;SPAN&gt;"SQUARE"&lt;/SPAN&gt;, &lt;SPAN&gt;"SHEET"&lt;/SPAN&gt;, &lt;SPAN&gt;"PURCHASED"&lt;/SPAN&gt; }) &lt;SPAN&gt;' Add more options here if needed&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;iPropVal&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt;

&lt;SPAN&gt;Try&lt;/SPAN&gt;
	&lt;SPAN&gt;'See if the iProperty exists currently&lt;/SPAN&gt;
	&lt;SPAN&gt;iPropVal&lt;/SPAN&gt; = &lt;SPAN&gt;iProperties&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;(&lt;SPAN&gt;"Custom"&lt;/SPAN&gt;, &lt;SPAN&gt;"Form Factor"&lt;/SPAN&gt;)
&lt;SPAN&gt;Catch&lt;/SPAN&gt; &lt;SPAN&gt;ex&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Exception&lt;/SPAN&gt;
	&lt;SPAN&gt;'It doesn't exists, so create it&lt;/SPAN&gt;
	&lt;SPAN&gt;Line1&lt;/SPAN&gt;:
	&lt;SPAN&gt;iPropVal&lt;/SPAN&gt; = &lt;SPAN&gt;InputListBox&lt;/SPAN&gt;(&lt;SPAN&gt;"Prompt"&lt;/SPAN&gt;, &lt;SPAN&gt;ValueList&lt;/SPAN&gt;, &lt;SPAN&gt;ValueList&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(0), &lt;SPAN&gt;Title&lt;/SPAN&gt; := &lt;SPAN&gt;"iLogic"&lt;/SPAN&gt;, &lt;SPAN&gt;ListName&lt;/SPAN&gt; := &lt;SPAN&gt;"Form List"&lt;/SPAN&gt;)
	&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;iPropVal&lt;/SPAN&gt; &lt;SPAN&gt;Is&lt;/SPAN&gt; &lt;SPAN&gt;Nothing&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;  &lt;SPAN&gt;' User closed form before selecting option&lt;/SPAN&gt;
		&lt;SPAN&gt;MessageBox&lt;/SPAN&gt;.&lt;SPAN&gt;Show&lt;/SPAN&gt;(&lt;SPAN&gt;"Please select a value"&lt;/SPAN&gt;, &lt;SPAN&gt;"Form List"&lt;/SPAN&gt;)
		&lt;SPAN&gt;GoTo&lt;/SPAN&gt; &lt;SPAN&gt;line1&lt;/SPAN&gt;
	&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;
	&lt;SPAN&gt;iProperties&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;(&lt;SPAN&gt;"Custom"&lt;/SPAN&gt;, &lt;SPAN&gt;"Form Factor"&lt;/SPAN&gt;) = &lt;SPAN&gt;iPropVal&lt;/SPAN&gt;
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;Try&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Apr 2021 19:16:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-determine-the-quot-form-factor-quot-of-a-part/m-p/10254619#M123509</guid>
      <dc:creator>lmc.engineering</dc:creator>
      <dc:date>2021-04-20T19:16:10Z</dc:date>
    </item>
  </channel>
</rss>

