<?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: iLogic Rule - Convert part type from above assembly in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-rule-convert-part-type-from-above-assembly/m-p/9983942#M119678</link>
    <description>&lt;P&gt;Actually yes. My original DXF export method did indeed look at an iproperty value (keyword) to choose whether to export or not. However, I had to look at an alternative export method because designers kept forgetting to add the iproperty value if they added custom parts.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also the export method of just looking at sheet metal would work on older models prior to any iproperty values being set up.&lt;/P&gt;</description>
    <pubDate>Thu, 07 Jan 2021 08:33:43 GMT</pubDate>
    <dc:creator>garethsmithHMNMK</dc:creator>
    <dc:date>2021-01-07T08:33:43Z</dc:date>
    <item>
      <title>iLogic Rule - Convert part type from above assembly</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-rule-convert-part-type-from-above-assembly/m-p/9979495#M119600</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd like a part type (sheet metal vs standard part) to be driven from a parameter in the part. However, I want to be able to fire the rule from an assembly and not in the part. The below works fine if the rule is run within the part but when fired from an above assembly it errors.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I kind of know why but can't seem to find the answer.&amp;nbsp; Can anyone help please?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;SEAL_CUSTOM_EXTENTS&lt;/SPAN&gt; = &lt;SPAN&gt;"REQUIRED"&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;"Project"&lt;/SPAN&gt;, &lt;SPAN&gt;"Part Number"&lt;/SPAN&gt;) = &lt;SPAN&gt;"N/A"&lt;/SPAN&gt;
&lt;SPAN&gt;iProperties&lt;/SPAN&gt;.&lt;SPAN&gt;Value&lt;/SPAN&gt;(&lt;SPAN&gt;"Summary"&lt;/SPAN&gt;, &lt;SPAN&gt;"Keywords"&lt;/SPAN&gt;) = &lt;SPAN&gt;"RTSM"&lt;/SPAN&gt;
&lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;ActiveDocument&lt;/SPAN&gt;.&lt;SPAN&gt;SubType&lt;/SPAN&gt; = &lt;SPAN&gt;"{4D29B490-49B2-11D0-93C3-7E0706000000}"&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;"Summary"&lt;/SPAN&gt;, &lt;SPAN&gt;"Keywords"&lt;/SPAN&gt;) = &lt;SPAN&gt;"N/A"&lt;/SPAN&gt;
&lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;ActiveDocument&lt;/SPAN&gt;.&lt;SPAN&gt;SubType&lt;/SPAN&gt; = &lt;SPAN&gt;"{9C464203-9BAE-11D3-8BAD-0060B0CE6BB4}"&lt;/SPAN&gt;
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jan 2021 15:44:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-rule-convert-part-type-from-above-assembly/m-p/9979495#M119600</guid>
      <dc:creator>garethsmithHMNMK</dc:creator>
      <dc:date>2021-01-05T15:44:36Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Rule - Convert part type from above assembly</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-rule-convert-part-type-from-above-assembly/m-p/9979633#M119605</link>
      <description>&lt;P&gt;If this is the entire rule, then I assume it is a local iLogic rule and that "SEAL_CUSTOM_EXTENTS" is the name of a local Parameter.&amp;nbsp; If so, that Parameter would need to exist within the Assembly.&lt;/P&gt;&lt;P&gt;Or if that parameter only exists within the target part, you would have to access its similarly to this:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;If Parameter.Value(oTargetDoc.DisplayName,"SEAL_CUSTOM_EXTENTS") = "REQUIRED" Then&lt;/LI-CODE&gt;&lt;P&gt;for it to work.&lt;/P&gt;&lt;P&gt;When using the iProperties.Value() route to access the iProperties, and you are not specifying a component name or a document name as the first input variable, you are accessing the iProperties of the document which contains this rule.&amp;nbsp; To access the iProperties of the target part file, you would either need to specify that part documents name as the first input variable (similarly to how I am doing in the Parameter call above, or you will have to access its iProperties the long way and dig down through the part document object, PropertySets, PropertySet, Property, Value.&lt;/P&gt;&lt;P&gt;Here is an alternative rule that you might use if accessing the parts parameters and iProperties from the assembly:&lt;/P&gt;&lt;P&gt;(You will need to create a variable for the target part document, and set its value somehow, which is what this first line is attempting to do, first.)&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Dim oTargetPart As PartDocument = ThisApplication.Documents.Open("C:\Temp\Part.ipt", False)

If Parameter.Value(oTargetPart.DisplayName,"SEAL_CUSTOM_EXTENTS") = "REQUIRED" Then
	iProperties.Value(oTargetPart.DisplayName, "Project", "Part Number") = "N/A"
	'or
	'oTargetPart.PropertySets.Item("Design Tracking Properties").Item("Part Number").Value = "N/A"
	
	iProperties.Value(oTargetPart.DisplayName, "Summary", "Keywords") = "RTSM"
	'or
	'oTargetPart.PropertySets.Item("Inventor Summary Information").Item("Keywords").Value = "RTSM"
Else
	iProperties.Value(oTargetPart.DisplayName, "Summary", "Keywords") = "N/A"
	'or
	'oTargetPart.PropertySets.Item("Inventor Summary Information").Item("Keywords").Value = "N/A"
	
	ThisApplication.ActiveDocument.SubType = "{9C464203-9BAE-11D3-8BAD-0060B0CE6BB4}"
End If&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this solved your problem, or answered your question, please click &lt;SPAN style="background-color: green; color: white;"&gt;&lt;STRONG&gt;ACCEPT SOLUTION&lt;/STRONG&gt;&lt;/SPAN&gt;.&lt;BR /&gt;Or, if this helped you, please click 'LIKE' &lt;SPAN&gt;&lt;img class="lia-deferred-image lia-image-emoji" src="https://forums.autodesk.com/html/@7401B55A0A518861312A0F851CD29320/emoticons/1f44d.png" alt=":thumbs_up:" title=":thumbs_up:" /&gt;&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;If you have time, please... Vote For &lt;A href="https://forums.autodesk.com/t5/forums/recentpostspage/post-type/message/interaction-style/idea/user-id/7812054/" target="_blank"&gt;My IDEAS &lt;SPAN&gt;&lt;img class="lia-deferred-image lia-image-emoji" src="https://forums.autodesk.com/html/@B166FEBB95D67CFA84899D32D8E17FC1/emoticons/1f4a1.png" alt=":light_bulb:" title=":light_bulb:" /&gt;&lt;/SPAN&gt;&lt;/A&gt;and Explore &lt;A href="https://knowledge.autodesk.com/profile/LTSUSR7HXMSAE/articles" target="_blank"&gt;My CONTRIBUTIONS &lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.autodesk.com/view/INVNTOR/2021/ENU/" target="_blank"&gt;Inventor 2021 Help &lt;/A&gt;| &lt;A href="https://forums.autodesk.com/t5/inventor-forum/bd-p/78/" target="_blank"&gt;Inventor Forum &lt;/A&gt;| &lt;A href="https://forums.autodesk.com/t5/inventor-customization/bd-p/120/" target="_blank"&gt;Inventor Customization Forum &lt;/A&gt;| &lt;A href="https://forums.autodesk.com/t5/inventor-ideas/idb-p/v1232/" target="_blank"&gt;Inventor Ideas Forum &lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jan 2021 16:27:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-rule-convert-part-type-from-above-assembly/m-p/9979633#M119605</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2021-01-05T16:27:13Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Rule - Convert part type from above assembly</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-rule-convert-part-type-from-above-assembly/m-p/9980444#M119619</link>
      <description>&lt;P&gt;if you run the rule from an assembly then "ThisApplication.ActiveDocument" will return the assembly document. You will need to get the part document object. From the code you gave i cant tell how you want to do that. But if you want to convert all part documents you could try the code below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN style="color: #ff0000;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;doc&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;AssemblyDocument&lt;/SPAN&gt; = &lt;SPAN style="color: #800080;"&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;ActiveDocument&lt;/SPAN&gt;
&lt;SPAN style="color: #ff0000;"&gt;For&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Each&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;refDoc&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Document&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;In&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;doc&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;AllReferencedDocuments&lt;/SPAN&gt;
    &lt;SPAN style="color: #ff0000;"&gt;If&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;refDoc&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;DocumentType&lt;/SPAN&gt; = &lt;SPAN style="color: #800000;"&gt;DocumentTypeEnum&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;kPartDocumentObject&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;Then&lt;/SPAN&gt;
        &lt;SPAN style="color: #800080;"&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;ActiveDocument&lt;/SPAN&gt;.&lt;SPAN style="color: #800000;"&gt;SubType&lt;/SPAN&gt; = &lt;SPAN style="color: #008080;"&gt;"{9C464203-9BAE-11D3-8BAD-0060B0CE6BB4}"&lt;/SPAN&gt;
    &lt;SPAN style="color: #ff0000;"&gt;End&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;If&lt;/SPAN&gt;
&lt;SPAN style="color: #ff0000;"&gt;Next&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jan 2021 21:08:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-rule-convert-part-type-from-above-assembly/m-p/9980444#M119619</guid>
      <dc:creator>JelteDeJong</dc:creator>
      <dc:date>2021-01-05T21:08:22Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Rule - Convert part type from above assembly</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-rule-convert-part-type-from-above-assembly/m-p/9981539#M119647</link>
      <description>&lt;P&gt;Thanks but but both methods don't work. Maybe a better explanation:&lt;/P&gt;&lt;P&gt;I have a 2 part assembly. Only 1 part in that assembly is sheet metal. But if that sheet metal part matches a size we keep stock I don't want it to be sheet metal because I'm using a dxf exprt method that looks for sheet metal parts and I don't want it to be exported so simply want to change its part type from sheet metal to a standard part.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jan 2021 10:47:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-rule-convert-part-type-from-above-assembly/m-p/9981539#M119647</guid>
      <dc:creator>garethsmithHMNMK</dc:creator>
      <dc:date>2021-01-06T10:47:16Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Rule - Convert part type from above assembly</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-rule-convert-part-type-from-above-assembly/m-p/9981544#M119648</link>
      <description>&lt;P&gt;Correction. Both parts need be sheet metal, 1 or the other sheet metal or non sheet metal. So it could do with naming the part that I want to change its part type.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jan 2021 10:50:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-rule-convert-part-type-from-above-assembly/m-p/9981544#M119648</guid>
      <dc:creator>garethsmithHMNMK</dc:creator>
      <dc:date>2021-01-06T10:50:52Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Rule - Convert part type from above assembly</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-rule-convert-part-type-from-above-assembly/m-p/9982884#M119667</link>
      <description>&lt;P&gt;Just an idea...but have you considered adding a custom iProperty, Attribute, or Parameter (or similar) within the parts in question, then changing its value according to your conditions.&amp;nbsp; Then alter your other solution that exports all the sheet metal parts, so that it checks the value of this special iProperty, Attribute, or Parameter, before it exports them?&amp;nbsp; And using this method instead of changing the part back and forth from being a regular part and being a Sheet Metal part?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this solved your problem, or answered your question, please click &lt;SPAN style="background-color: green; color: white;"&gt;&lt;STRONG&gt;ACCEPT SOLUTION&lt;/STRONG&gt;&lt;/SPAN&gt;.&lt;BR /&gt;Or, if this helped you, please click 'LIKE' &lt;SPAN&gt;&lt;img class="lia-deferred-image lia-image-emoji" src="https://forums.autodesk.com/html/@7401B55A0A518861312A0F851CD29320/emoticons/1f44d.png" alt=":thumbs_up:" title=":thumbs_up:" /&gt;&lt;/SPAN&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jan 2021 19:49:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-rule-convert-part-type-from-above-assembly/m-p/9982884#M119667</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2021-01-06T19:49:20Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Rule - Convert part type from above assembly</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-rule-convert-part-type-from-above-assembly/m-p/9983942#M119678</link>
      <description>&lt;P&gt;Actually yes. My original DXF export method did indeed look at an iproperty value (keyword) to choose whether to export or not. However, I had to look at an alternative export method because designers kept forgetting to add the iproperty value if they added custom parts.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also the export method of just looking at sheet metal would work on older models prior to any iproperty values being set up.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jan 2021 08:33:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-rule-convert-part-type-from-above-assembly/m-p/9983942#M119678</guid>
      <dc:creator>garethsmithHMNMK</dc:creator>
      <dc:date>2021-01-07T08:33:43Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Rule - Convert part type from above assembly</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-rule-convert-part-type-from-above-assembly/m-p/9984442#M119692</link>
      <description>&lt;P&gt;I see.&amp;nbsp; Tough situation.&amp;nbsp; Here is a more robust and complete version of my earlier code, with several checks in there to help eliminate some possible errors that may be preventing it from working.&lt;/P&gt;&lt;LI-CODE lang="general"&gt;If ThisApplication.ActiveDocumentType &amp;lt;&amp;gt; DocumentTypeEnum.kAssemblyDocumentObject Then
	MsgBox("An Assembly Document must be active for this rule (" &amp;amp; iLogicVb.RuleName &amp;amp; ") to work. Exiting.",vbOKOnly+vbCritical, "WRONG DOCUMENT TYPE")
	Exit Sub
End If
Dim oADoc As AssemblyDocument = ThisAssembly.Document
For Each oRefDoc As Document In oADoc.AllReferencedDocuments
	If oRefDoc.DocumentType = DocumentTypeEnum.kPartDocumentObject Then
		Dim oPDoc As PartDocument = ThisApplication.Documents.Open(oRefDoc.FullDocumentName, False)
		For Each oUParam As UserParameter In oPDoc.ComponentDefinition.Parameters.UserParameters
			Dim oExists As Boolean
			If oUParam.Name = "SEAL_CUSTOM_EXTENTS" Then
				oExists = True
				If oUParam.Value = "REQUIRED" Then
					oPDoc.PropertySets.Item("Design Tracking Properties").Item("Part Number").Value = "N/A"
					oPDoc.PropertySets.Item("Inventor Summary Information").Item("Keywords").Value = "RTSM"
					Try
						'Check if it is a 'Regular Part', if not change it to one.
						If oPDoc.SubType &amp;lt;&amp;gt; "{4D29B490-49B2-11D0-93C3-7E0706000000}" Then
							oPDoc.SubType = "{4D29B490-49B2-11D0-93C3-7E0706000000}"
						End If
					Catch
						MsgBox("The attempt to change the SubType of " &amp;amp; oPDoc.FullFileName &amp;amp; vbCrLf &amp;amp; _
						"to a 'Regular Part' failed.",,"")
					End Try
				Else 'if that parameter didn't have that value...
					oPDoc.PropertySets.Item("Inventor Summary Information").Item("Keywords").Value = "N/A"
					Try
						'Check if it is a 'Sheet Metal Part', if not change it to one.
						If oPDoc.SubType &amp;lt;&amp;gt; "{9C464203-9BAE-11D3-8BAD-0060B0CE6BB4}" Then
							oPDoc.SubType = "{9C464203-9BAE-11D3-8BAD-0060B0CE6BB4}"
						End If
					Catch
						MsgBox("The attempt to change the SubType of " &amp;amp; oPDoc.FullFileName &amp;amp; vbCrLf &amp;amp; _
						"to a 'Sheet Metal Part' failed.",,"")
					End Try
				End If
			End If
			If oExists = False Then
				MsgBox("The User Parameter 'SEAL_CUSTOM_EXTENTS' was not found within" &amp;amp; vbCrLf &amp;amp; _
				oPDoc.FullFileName &amp;amp; vbCrLf &amp;amp; _
				"so this part was not processed.", , "Parameter Not Found")
			End If
		Next
		oPDoc.Save
		oPDoc.Close(True)
	End If
Next&lt;/LI-CODE&gt;&lt;P&gt;Also, just in case you weren't aware, there is another option for checking the document's SubType, that is actually readable/understandable.&amp;nbsp; There are iProperties named "Document SubType" and "Document SubType Name" within the "Design Tracking Properties" set.&amp;nbsp; I have found these to be very reliable, and found that they instantly update when changing a part back and forth between regular part and sheet metal part in my testing.&amp;nbsp; In English, if a part is a regular part, the value of "Document SubType Name" is "Modeling", and if is a sheet metal part, the value is "Sheet Metal".&amp;nbsp; Although, I am not sure if those values may change to different words for different language Inventor installations.&amp;nbsp; I have also created an &lt;A href="https://forums.autodesk.com/t5/inventor-ideas/create-enum-for-documentsubtype-amp-or-document-subtype/idc-p/9467787#M38862" target="_blank" rel="noopener"&gt;'Idea' within the Inventor Idea Station to create a 'DocumentSubTypeEnum'&lt;/A&gt; to better handle these types of inquiries in a readable, stable way.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this solved your problem, or answered your question, please click &lt;SPAN style="background-color: green; color: white;"&gt;&lt;STRONG&gt;ACCEPT SOLUTION&lt;/STRONG&gt;&lt;/SPAN&gt;.&lt;BR /&gt;Or, if this helped you, please click 'LIKE' &lt;SPAN&gt;&lt;img class="lia-deferred-image lia-image-emoji" src="https://forums.autodesk.com/html/@7401B55A0A518861312A0F851CD29320/emoticons/1f44d.png" alt=":thumbs_up:" title=":thumbs_up:" /&gt;&lt;/SPAN&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jan 2021 12:46:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-rule-convert-part-type-from-above-assembly/m-p/9984442#M119692</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2021-01-07T12:46:25Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Rule - Convert part type from above assembly</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-rule-convert-part-type-from-above-assembly/m-p/9984529#M119695</link>
      <description>&lt;P&gt;Sorry getting the following errors:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Error on Line 2 : 'RuleName' is not a member of 'Autodesk.iLogic.Interfaces.ILowLevelSupport'.&lt;BR /&gt;Error on Line 5 : 'ThisAssembly' is not accessible in this context because it is 'Friend'.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jan 2021 13:25:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-rule-convert-part-type-from-above-assembly/m-p/9984529#M119695</guid>
      <dc:creator>garethsmithHMNMK</dc:creator>
      <dc:date>2021-01-07T13:25:54Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Rule - Convert part type from above assembly</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-rule-convert-part-type-from-above-assembly/m-p/9984822#M119700</link>
      <description>&lt;P&gt;OK. Some peoples installs don't seem to like that 'iLogicVb.RuleName' use, even though I've been using it for years without any problems.&amp;nbsp; It is totally unnecessary though, and can simply be completely eliminated/deleted from that message, if it is causing issues.&amp;nbsp; You can have that message say anything you want.&amp;nbsp; It is just meant to inform you if the active document when the rule is started it the right type of document or not, and that if it is the wrong type, it is going to exit the rule without running.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If 'ThisAssembly.Document' is causing you problems, try replacing it with 'ThisApplication.ActiveDocument'.&lt;/P&gt;&lt;P&gt;Although I am curious why it is having a problem with it.&amp;nbsp; Are you running this code as a local iLogic rule, an external iLogic rule, or from Visual Studio?&amp;nbsp; If you are running it normally as an iLogic rule in Inventor, do you have the "Straight VB code" option turned on or are you using other settings within the header area of the rule?&amp;nbsp; If so, you may need to turn that option off.&amp;nbsp; And if necessary, put the whole code within a "Sub Main", then the code, then "End Sub", even though iLogic is supposedly implying those for you in the background.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this solved your problem, or answered your question, please click &lt;SPAN style="background-color: green; color: white;"&gt;&lt;STRONG&gt;ACCEPT SOLUTION&lt;/STRONG&gt;&lt;/SPAN&gt;.&lt;BR /&gt;Or, if this helped you, please click 'LIKE' &lt;SPAN&gt;&lt;img class="lia-deferred-image lia-image-emoji" src="https://forums.autodesk.com/html/@7401B55A0A518861312A0F851CD29320/emoticons/1f44d.png" alt=":thumbs_up:" title=":thumbs_up:" /&gt;&lt;/SPAN&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jan 2021 15:11:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-rule-convert-part-type-from-above-assembly/m-p/9984822#M119700</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2021-01-07T15:11:36Z</dc:date>
    </item>
  </channel>
</rss>

