<?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 to Turn-On Frame Generator Part Start Plane and End Plane in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-turn-on-frame-generator-part-start-plane-and-end/m-p/12362785#M17153</link>
    <description>&lt;P&gt;Hi Alan,&lt;/P&gt;&lt;P&gt;Thanks for writing that code for me!&lt;/P&gt;&lt;P&gt;Funny thing is, I had time this morning to try my hand at this.&lt;/P&gt;&lt;P&gt;Here is what I got to work:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;' Mentor A.Acheson in reply to: cadman777 - ‎11-05-2023 11:47 AM 
' Adjust the workplane index if the workplane isn't visible.
' View must be picked before running this rule
Dim Done As Boolean = False
Dim dv As DrawingView
Dim selectSet As SelectSet = ThisDoc.Document.SelectSet
If TypeOf selectSet.Item(1) Is DrawingView Then  
  dv = selectSet.Item(1)  
' Messagebox.Show(dv.Name)
Dim partDoc As PartDocument = dv.ReferencedDocumentDescriptor.ReferencedDocument
Dim wp As WorkPlane = partDoc.ComponentDefinition.WorkPlanes(1)
Dim wp1 As WorkPlane = partDoc.ComponentDefinition.WorkPlanes.Item("Start Plane")
Dim wp2 As WorkPlane = partDoc.ComponentDefinition.WorkPlanes.Item("End Plane")
	dv.SetIncludeStatus(wp1, True)
	dv.SetIncludeStatus(wp2, True)
'	SelectMore = MsgBox("Want to pick another view?", vbYesNo, "Pick more...")
'If SelectMore = vbYes Then
'	Done = False
'Else
	Done = True
End If
'End If&lt;/LI-CODE&gt;&lt;P&gt;Thing is, I couldn't use the 'Do' b/c it needs a final 'Loop', which sent it into a perpetual loop.&lt;/P&gt;&lt;P&gt;I looked up online and discovered that there's no way to end a loop except the way I did it: CTRL+ALT+DEL&amp;gt;End Task!&lt;/P&gt;&lt;P&gt;So I combined both your codes and some other stuff I found online and got it to work.&lt;/P&gt;&lt;P&gt;Horray!&lt;/P&gt;&lt;P&gt;But, I still have to pick the view before running the Rule.&lt;/P&gt;&lt;P&gt;And if I pick multiple views, it only works on one view.&lt;/P&gt;&lt;P&gt;So then I have to start the process again.&lt;/P&gt;&lt;P&gt;Anyway, let me try your code and see if it works better!&lt;/P&gt;</description>
    <pubDate>Wed, 08 Nov 2023 13:50:56 GMT</pubDate>
    <dc:creator>cadman777</dc:creator>
    <dc:date>2023-11-08T13:50:56Z</dc:date>
    <item>
      <title>iLogic Rule to Turn-On Frame Generator Part Start Plane and End Plane</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-turn-on-frame-generator-part-start-plane-and-end/m-p/12348119#M17139</link>
      <description>&lt;P&gt;Hello Experts,&lt;/P&gt;&lt;P&gt;I'm trying to make an angle dimension on the end of a part that's mitered so the chop saw guys can set the saw angle.&lt;/P&gt;&lt;P&gt;However, Inventor doesn't have a way to do this out-of-the-box.&lt;/P&gt;&lt;P&gt;Last week I inquired in here of an alternative way to do this, but it didn't work.&lt;/P&gt;&lt;P&gt;So now I'm inquiring to see if someone has an iLogic rule they are willing to share, or can make one and share it with me, that turns-on a FrameGenerator part's StartPlane and EndPlane.&lt;/P&gt;&lt;P&gt;Any help is much appreciated!&lt;/P&gt;</description>
      <pubDate>Thu, 02 Nov 2023 02:19:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-turn-on-frame-generator-part-start-plane-and-end/m-p/12348119#M17139</guid>
      <dc:creator>cadman777</dc:creator>
      <dc:date>2023-11-02T02:19:01Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Rule to Turn-On Frame Generator Part Start Plane and End Plane</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-turn-on-frame-generator-part-start-plane-and-end/m-p/12349391#M17140</link>
      <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/88249"&gt;@cadman777&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't have a rule ready but we can create one from first principles and you hopefully can do it in future ones.&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. To start with what is the name or unique iproperty of the occurrence you want to target. I assume you don't want to turn on them all so maybe a description, part number or you want to manually select?&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. What are the names of the workplanes your targeting? I know one is the origin but this can be any origin if it's a custom author. Does it have another or is it simply an extrusion?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So the workplane collection is access from the component definition object which in turn is accessed from the component occurrence if in an assembly. This order is working backwards from the object you want to control but usually you would work top down through each object.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. You can get part component occurrence in many ways, user picking, looping through leaf occurrences from the assembly document etc&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.autodesk.com/view/INVNTOR/2022/ENU/?guid=CommandManager_Pick_Sample" target="_blank" rel="noopener"&gt;Here is the pick command, change the enum as needed. &lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is leaf occurrences.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Syntax &lt;SPAN&gt;AssemblyDocument.&lt;/SPAN&gt;&lt;STRONG&gt;ComponentDefinition&lt;/STRONG&gt;&lt;SPAN&gt;() As&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://help.autodesk.com/view/INVNTOR/2022/ENU/?guid=AssemblyComponentDefinition" target="_blank" rel="noopener"&gt;AssemblyComponentDefinition&lt;/A&gt; Syntax&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ComponentDefinition.&lt;/SPAN&gt;&lt;STRONG&gt;Occurrences&lt;/STRONG&gt;&lt;SPAN&gt;() As&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://help.autodesk.com/view/INVNTOR/2022/ENU/?guid=ComponentOccurrences" target="_blank" rel="noopener"&gt;ComponentOccurrences&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Syntax&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ComponentOccurrences.&lt;/SPAN&gt;&lt;STRONG&gt;AllLeafOccurrences&lt;/STRONG&gt;&lt;SPAN&gt;( [&lt;/SPAN&gt;&lt;STRONG&gt;&lt;I&gt;LeafDefinition&lt;/I&gt;&lt;/STRONG&gt;&lt;SPAN&gt;] As Variant ) As&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://help.autodesk.com/view/INVNTOR/2022/ENU/?guid=ComponentOccurrencesEnumerator" target="_blank" rel="noopener"&gt;ComponentOccurrencesEnumerator&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So you will need to declare it as a part component definition to have it pop up on the menu.&lt;/P&gt;&lt;P&gt;Syntax&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ComponentOccurrence.&lt;/SPAN&gt;&lt;STRONG&gt;Definition&lt;/STRONG&gt;&lt;SPAN&gt;() As&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://help.autodesk.com/view/INVNTOR/2022/ENU/?guid=ComponentDefinition" target="_blank" rel="noopener"&gt;ComponentDefinition&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Syntax&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;PartComponentDefinition.&lt;/SPAN&gt;&lt;STRONG&gt;WorkPlanes&lt;/STRONG&gt;&lt;SPAN&gt;() As&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://help.autodesk.com/view/INVNTOR/2022/ENU/?guid=WorkPlanes" target="_blank" rel="noopener"&gt;WorkPlanes&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Nov 2023 14:24:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-turn-on-frame-generator-part-start-plane-and-end/m-p/12349391#M17140</guid>
      <dc:creator>A.Acheson</dc:creator>
      <dc:date>2023-11-02T14:24:05Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Rule to Turn-On Frame Generator Part Start Plane and End Plane</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-turn-on-frame-generator-part-start-plane-and-end/m-p/12349684#M17141</link>
      <description>&lt;P&gt;Thanks for this info, Alan.&lt;/P&gt;&lt;P&gt;This is just what I want to know.&lt;/P&gt;&lt;P&gt;I don't have time today to dive into this, but will as soon as I get a 'break in the action'.&lt;/P&gt;&lt;P&gt;Then I'll get right back to you on this.&lt;/P&gt;&lt;P&gt;Cheers!&lt;/P&gt;</description>
      <pubDate>Thu, 02 Nov 2023 15:36:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-turn-on-frame-generator-part-start-plane-and-end/m-p/12349684#M17141</guid>
      <dc:creator>cadman777</dc:creator>
      <dc:date>2023-11-02T15:36:34Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Rule to Turn-On Frame Generator Part Start Plane and End Plane</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-turn-on-frame-generator-part-start-plane-and-end/m-p/12350388#M17142</link>
      <description>&lt;P&gt;To clarify you can go to &lt;A href="https://forums.autodesk.com/t5/inventor-forum/drawing-detail-miter-angle-dimension/m-p/12336515/highlight/false#M912426" target="_blank" rel="noopener"&gt;this thread&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;Just look at the pics in Message 1.&lt;/P&gt;&lt;P&gt;These are 'single part' details on an Inventor idw drawing.&lt;/P&gt;&lt;P&gt;They are all packed onto a single sheet (or as many sheets as are necessary).&lt;/P&gt;&lt;P&gt;These parts are all FrameGenerator parts.&lt;/P&gt;&lt;P&gt;The objective is to Run the iLogic rule, then select the single part drawing view that needs angle dimensions, and then the iLogic rule will automatically turn on the StartPlane and EndPlane. And it will continuously run until ESC is pressed or another command is selected. That way, I don't have to press enter or keep restarting the rule for the many single part details on each drawing sheet. This rule will help me add angle dimensions to the miter the way the shop guys need to see it. At present I'm creating a drawing Sketch on every view, then Projecting the long sides of the part, then adding a very short hash mark at both vertices, then finishing the Sketch an adding angle dimensions (which requires zooming-in very close to see the hash mark, and then zooming out to finish the angle dimension. I have to do all that for each end of every part that's mitered. This was an idea that&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/467314"&gt;@blandb&lt;/a&gt; suggested in the above link.&lt;/P&gt;&lt;P&gt;So I won't be doing this with an assembly, only single parts, and only on an idw drawing.&lt;/P&gt;&lt;P&gt;&lt;A href="https://inventortrenches.blogspot.com/2013/03/turn-onoff-all-workfeatures-with-ilogic.html" target="_blank" rel="noopener"&gt;Here's where I started in my quest for info on this.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-to-turn-on-visablity-of-a-plane-in-all-views-of-a-drawing/td-p/6667072" target="_blank" rel="noopener"&gt;Then I went here.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://adndevblog.typepad.com/manufacturing/2012/06/include-with-api-a-work-plane-from-model-inside-the-drawing.html" target="_blank" rel="noopener"&gt;And here.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Thanks...&lt;/P&gt;</description>
      <pubDate>Thu, 02 Nov 2023 20:40:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-turn-on-frame-generator-part-start-plane-and-end/m-p/12350388#M17142</guid>
      <dc:creator>cadman777</dc:creator>
      <dc:date>2023-11-02T20:40:30Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Rule to Turn-On Frame Generator Part Start Plane and End Plane</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-turn-on-frame-generator-part-start-plane-and-end/m-p/12350448#M17143</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/88249"&gt;@cadman777&lt;/a&gt;&amp;nbsp;Thanks for the clarification. because your now in a drawing you have increased the complexity further. The below is the equivalent of&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AAcheson_0-1698957372978.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1287797i2471E9781AD7901B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AAcheson_0-1698957372978.png" alt="AAcheson_0-1698957372978.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Syntax&lt;/P&gt;&lt;P&gt;DrawingView.&lt;STRONG&gt;SetIncludeStatus&lt;/STRONG&gt;( &lt;STRONG&gt;&lt;I&gt;Object&lt;/I&gt;&lt;/STRONG&gt; As Object, &lt;STRONG&gt;&lt;I&gt;Include&lt;/I&gt;&lt;/STRONG&gt; As Boolean )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and this will allow you to find if it has allready being set&lt;/P&gt;&lt;P&gt;Syntax&lt;/P&gt;&lt;P&gt;DrawingView.&lt;STRONG&gt;GetIncludeStatus&lt;/STRONG&gt;( &lt;STRONG&gt;&lt;I&gt;Object&lt;/I&gt;&lt;/STRONG&gt; As Object ) As Boolean&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Rough workflow&lt;/P&gt;&lt;P&gt;To get here you will need a drawing curve segment then get the occurrence then the workplane and assuming it's just a part your working with give the workplane object to the below Set include method.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The alternative is just assume you have one part document and from the view get the model document and from there go direct to workplane.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Nov 2023 20:44:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-turn-on-frame-generator-part-start-plane-and-end/m-p/12350448#M17143</guid>
      <dc:creator>A.Acheson</dc:creator>
      <dc:date>2023-11-02T20:44:51Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Rule to Turn-On Frame Generator Part Start Plane and End Plane</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-turn-on-frame-generator-part-start-plane-and-end/m-p/12350586#M17144</link>
      <description>&lt;P&gt;This is probably the best pathway:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;The alternative is just assume you have one part document and from the view
get the model document and from there go direct to workplane.&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 02 Nov 2023 21:58:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-turn-on-frame-generator-part-start-plane-and-end/m-p/12350586#M17144</guid>
      <dc:creator>cadman777</dc:creator>
      <dc:date>2023-11-02T21:58:36Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Rule to Turn-On Frame Generator Part Start Plane and End Plane</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-turn-on-frame-generator-part-start-plane-and-end/m-p/12350733#M17145</link>
      <description>&lt;P&gt;In that case you can use the first views model document and the ilogic function is "ThisDoc.ModelDocument" see ilogic API &lt;A href="https://help.autodesk.com/view/INVNTOR/2022/ENU/?guid=GUID-FA2587E0-8106-466C-AEDC-93CF9F6497C7" target="_blank" rel="noopener"&gt;Help here&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Dim partDoc as PartDocument = ThisDoc.ModelDocument&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Once you have this then use the same technique as workplane retrieval in the part document. Test you have the correct object by getting its name.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Nov 2023 23:58:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-turn-on-frame-generator-part-start-plane-and-end/m-p/12350733#M17145</guid>
      <dc:creator>A.Acheson</dc:creator>
      <dc:date>2023-11-02T23:58:11Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Rule to Turn-On Frame Generator Part Start Plane and End Plane</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-turn-on-frame-generator-part-start-plane-and-end/m-p/12350762#M17146</link>
      <description>&lt;P&gt;OK, lemme work on it and get back to you.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 02 Nov 2023 23:50:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-turn-on-frame-generator-part-start-plane-and-end/m-p/12350762#M17146</guid>
      <dc:creator>cadman777</dc:creator>
      <dc:date>2023-11-02T23:50:11Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Rule to Turn-On Frame Generator Part Start Plane and End Plane</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-turn-on-frame-generator-part-start-plane-and-end/m-p/12355335#M17147</link>
      <description>&lt;P&gt;UPDATE:&lt;/P&gt;&lt;P&gt;I re-read this thread and think you still may not understand what I want to accomplish.&lt;/P&gt;&lt;P&gt;Picture this: There is a drawing with 40 single part details on it, all of which are FrameGenerator parts.&lt;/P&gt;&lt;P&gt;Each detail has 3 views: end, right side, right top.&lt;/P&gt;&lt;P&gt;I want an iLogic rule that I can start, and then click on the right view (or whatever view is necessary), resulting in the StartPlane and EndPlane turning-on. Then the Rule will continue to run so I can continue to pick view after view, until all the views on the sheet that need the work planes showing are changed. And when any other command, or ESC, or ENTER is activated, then Rule stops running.&lt;/P&gt;</description>
      <pubDate>Sun, 05 Nov 2023 17:16:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-turn-on-frame-generator-part-start-plane-and-end/m-p/12355335#M17147</guid>
      <dc:creator>cadman777</dc:creator>
      <dc:date>2023-11-05T17:16:58Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Rule to Turn-On Frame Generator Part Start Plane and End Plane</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-turn-on-frame-generator-part-start-plane-and-end/m-p/12355454#M17148</link>
      <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/88249"&gt;@cadman777&lt;/a&gt;&lt;/P&gt;&lt;P&gt;In that case you cannot use the simple ilogic snippet to pick up the model document. This only works if you have one model document per drawing file. Try the below. Adjust the workplane index if the workplane isn't visible. You can also give the name of the workplane as a string ( "1234")&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Dim drawView As DrawingView = ThisApplication.CommandManager.Pick(selectionfilterenum.kDrawingViewFilter, "Pick View")

Dim partDoc As PartDocument = drawView.ReferencedDocumentDescriptor.ReferencedDocument
Dim wp As WorkPlane = partDoc.ComponentDefinition.WorkPlanes(1)

drawView.SetIncludeStatus(wp, True)
       
    &lt;/LI-CODE&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sun, 05 Nov 2023 19:47:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-turn-on-frame-generator-part-start-plane-and-end/m-p/12355454#M17148</guid>
      <dc:creator>A.Acheson</dc:creator>
      <dc:date>2023-11-05T19:47:10Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Rule to Turn-On Frame Generator Part Start Plane and End Plane</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-turn-on-frame-generator-part-start-plane-and-end/m-p/12359861#M17149</link>
      <description>&lt;P&gt;OK, I looked at this and tried it.&lt;/P&gt;&lt;P&gt;I keep forgetting that I have Inventor 2010.&lt;/P&gt;&lt;P&gt;So I need a solution for user selection ("pick") in a drawing (the view or a line to i.d. the part).&lt;/P&gt;&lt;P&gt;It was mentioned in my other thread, but I never was able to figure it out.&lt;/P&gt;&lt;P&gt;Any chance you can link me to that info?&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2023 13:08:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-turn-on-frame-generator-part-start-plane-and-end/m-p/12359861#M17149</guid>
      <dc:creator>cadman777</dc:creator>
      <dc:date>2023-11-07T13:08:36Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Rule to Turn-On Frame Generator Part Start Plane and End Plane</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-turn-on-frame-generator-part-start-plane-and-end/m-p/12360302#M17150</link>
      <description>&lt;P&gt;A simple way around that is to pick the view before starting the rule using select set. This was the orgional item selection in VBA. See&amp;nbsp;&amp;nbsp;&lt;A href="https://help.autodesk.com/view/INVNTOR/2022/ENU/?guid=DrawingDimension_Text_Sample" target="_blank" rel="noopener"&gt;example here and o&lt;/A&gt;&lt;A href="https://help.autodesk.com/view/INVNTOR/2022/ENU/?guid=SelectSet" target="_blank" rel="noopener"&gt;bject help page here&lt;/A&gt;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Dim selectSet As SelectSet = ThisDoc.Document.SelectSet
Dim drawView As DrawingView
If Typeof selectSet.Item(1) Is DrawingView Then  
  drawView = selectSet.Item(1)  
  Messagebox.Show(drawView.Name)
End If&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2023 15:29:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-turn-on-frame-generator-part-start-plane-and-end/m-p/12360302#M17150</guid>
      <dc:creator>A.Acheson</dc:creator>
      <dc:date>2023-11-07T15:29:17Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Rule to Turn-On Frame Generator Part Start Plane and End Plane</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-turn-on-frame-generator-part-start-plane-and-end/m-p/12360421#M17151</link>
      <description>&lt;P&gt;Excellent, thanks.&lt;/P&gt;&lt;P&gt;So that means I have to do a Loop that inputs the name of each selected view, right?&lt;/P&gt;&lt;P&gt;But if I select them one at a time, then how would I do it if I only select one view instead of selecting all the views before Running the Rule?&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2023 16:16:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-turn-on-frame-generator-part-start-plane-and-end/m-p/12360421#M17151</guid>
      <dc:creator>cadman777</dc:creator>
      <dc:date>2023-11-07T16:16:33Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Rule to Turn-On Frame Generator Part Start Plane and End Plane</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-turn-on-frame-generator-part-start-plane-and-end/m-p/12361827#M17152</link>
      <description>&lt;P&gt;Here is the working code. SelectSet is an object collection so you just need to loop through the collection to work with each object.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="visual-basic"&gt;Dim selectSet As SelectSet = ThisDoc.Document.SelectSet

'Do single selection
While selectSet.Count = 0
	ThisApplication.UserInterfaceManager.DoEvents
End While

For Each sel In selectSet

	Dim drawView As DrawingView

	If TypeOf sel Is DrawingView Then  
	  	drawView = sel  
		Dim partDoc As PartDocument = drawView.ReferencedDocumentDescriptor.ReferencedDocument
		Dim wp As WorkPlane = partDoc.ComponentDefinition.WorkPlanes("XY Plane")
		
		Try
			drawView.SetIncludeStatus(wp, True)
		Catch
		End Try
		
	End If
	
Next&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Nov 2023 04:11:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-turn-on-frame-generator-part-start-plane-and-end/m-p/12361827#M17152</guid>
      <dc:creator>A.Acheson</dc:creator>
      <dc:date>2023-11-08T04:11:14Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Rule to Turn-On Frame Generator Part Start Plane and End Plane</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-turn-on-frame-generator-part-start-plane-and-end/m-p/12362785#M17153</link>
      <description>&lt;P&gt;Hi Alan,&lt;/P&gt;&lt;P&gt;Thanks for writing that code for me!&lt;/P&gt;&lt;P&gt;Funny thing is, I had time this morning to try my hand at this.&lt;/P&gt;&lt;P&gt;Here is what I got to work:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;' Mentor A.Acheson in reply to: cadman777 - ‎11-05-2023 11:47 AM 
' Adjust the workplane index if the workplane isn't visible.
' View must be picked before running this rule
Dim Done As Boolean = False
Dim dv As DrawingView
Dim selectSet As SelectSet = ThisDoc.Document.SelectSet
If TypeOf selectSet.Item(1) Is DrawingView Then  
  dv = selectSet.Item(1)  
' Messagebox.Show(dv.Name)
Dim partDoc As PartDocument = dv.ReferencedDocumentDescriptor.ReferencedDocument
Dim wp As WorkPlane = partDoc.ComponentDefinition.WorkPlanes(1)
Dim wp1 As WorkPlane = partDoc.ComponentDefinition.WorkPlanes.Item("Start Plane")
Dim wp2 As WorkPlane = partDoc.ComponentDefinition.WorkPlanes.Item("End Plane")
	dv.SetIncludeStatus(wp1, True)
	dv.SetIncludeStatus(wp2, True)
'	SelectMore = MsgBox("Want to pick another view?", vbYesNo, "Pick more...")
'If SelectMore = vbYes Then
'	Done = False
'Else
	Done = True
End If
'End If&lt;/LI-CODE&gt;&lt;P&gt;Thing is, I couldn't use the 'Do' b/c it needs a final 'Loop', which sent it into a perpetual loop.&lt;/P&gt;&lt;P&gt;I looked up online and discovered that there's no way to end a loop except the way I did it: CTRL+ALT+DEL&amp;gt;End Task!&lt;/P&gt;&lt;P&gt;So I combined both your codes and some other stuff I found online and got it to work.&lt;/P&gt;&lt;P&gt;Horray!&lt;/P&gt;&lt;P&gt;But, I still have to pick the view before running the Rule.&lt;/P&gt;&lt;P&gt;And if I pick multiple views, it only works on one view.&lt;/P&gt;&lt;P&gt;So then I have to start the process again.&lt;/P&gt;&lt;P&gt;Anyway, let me try your code and see if it works better!&lt;/P&gt;</description>
      <pubDate>Wed, 08 Nov 2023 13:50:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-turn-on-frame-generator-part-start-plane-and-end/m-p/12362785#M17153</guid>
      <dc:creator>cadman777</dc:creator>
      <dc:date>2023-11-08T13:50:56Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Rule to Turn-On Frame Generator Part Start Plane and End Plane</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-turn-on-frame-generator-part-start-plane-and-end/m-p/12362839#M17154</link>
      <description>&lt;P&gt;Yup, that did it.&lt;/P&gt;&lt;P&gt;That's what the rule needed to rifle through the picked views.&lt;/P&gt;&lt;P&gt;Here's my slight modification to your rule so it turns-on the StartPlane &amp;amp; EndPlane on FG parts:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;' Mentor A.Acheson in reply to: cadman777 - 11-07-2023 08:11 PM 
' Here is the working code
' SelectSet is an object collection so you just need to loop through the collection to work with each object.
' Adjust the workplane index if the workplane isn't visible.
' View must be picked before running this rule

Dim selectSet As SelectSet = ThisDoc.Document.SelectSet

'Do single selection
While selectSet.Count = 0
	ThisApplication.UserInterfaceManager.DoEvents
End While

For Each sel In selectSet

	Dim drawView As DrawingView

	If TypeOf sel Is DrawingView Then  
	  	drawView = sel  
		Dim partDoc As PartDocument = drawView.ReferencedDocumentDescriptor.ReferencedDocument
'		Dim wp As WorkPlane = partDoc.ComponentDefinition.WorkPlanes("XY Plane")
		Dim wp1 As WorkPlane = partDoc.ComponentDefinition.WorkPlanes.Item("Start Plane")
		Dim wp2 As WorkPlane = partDoc.ComponentDefinition.WorkPlanes.Item("End Plane")

		Try
'			drawView.SetIncludeStatus(wp, True)
			drawView.SetIncludeStatus(wp1, True)
			drawView.SetIncludeStatus(wp2, True)

		Catch
		End Try
		
	End If
	
Next&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks for your able assistance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Nov 2023 14:13:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-turn-on-frame-generator-part-start-plane-and-end/m-p/12362839#M17154</guid>
      <dc:creator>cadman777</dc:creator>
      <dc:date>2023-11-08T14:13:48Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Rule to Turn-On Frame Generator Part Start Plane and End Plane</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-turn-on-frame-generator-part-start-plane-and-end/m-p/12363001#M17155</link>
      <description>&lt;P&gt;Glad to hear you got it functioning. I think Michael helped you out with another version without pick function&amp;nbsp; I didn't get a chance to study but it relies on events so might have the ability to select multiples after rule starts.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/inventor-programming-ilogic/angle-dimension-to-virtual-perpendicular/m-p/12341606#M159675" target="_blank"&gt;https://forums.autodesk.com/t5/inventor-programming-ilogic/angle-dimension-to-virtual-perpendicular/m-p/12341606#M159675&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Nov 2023 15:10:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-turn-on-frame-generator-part-start-plane-and-end/m-p/12363001#M17155</guid>
      <dc:creator>A.Acheson</dc:creator>
      <dc:date>2023-11-08T15:10:24Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Rule to Turn-On Frame Generator Part Start Plane and End Plane</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-turn-on-frame-generator-part-start-plane-and-end/m-p/12363388#M17156</link>
      <description>&lt;P&gt;Yeah, I tried it, but it threw a list of errors that I didn't have the mind to figure out...&lt;/P&gt;</description>
      <pubDate>Wed, 08 Nov 2023 17:03:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-rule-to-turn-on-frame-generator-part-start-plane-and-end/m-p/12363388#M17156</guid>
      <dc:creator>cadman777</dc:creator>
      <dc:date>2023-11-08T17:03:59Z</dc:date>
    </item>
  </channel>
</rss>

