<?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 Half Section View Settings Value Offset in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-half-section-view-settings-value-offset/m-p/12568154#M163881</link>
    <description>&lt;P&gt;If it works as is but with no offset, it looks like you just need to adjust the definition of rootPoint to include the offset in the desired direction. The root point lies on the transient plane, your code has it on the plane you select.&lt;/P&gt;</description>
    <pubDate>Mon, 19 Feb 2024 00:11:19 GMT</pubDate>
    <dc:creator>nmunro</dc:creator>
    <dc:date>2024-02-19T00:11:19Z</dc:date>
    <item>
      <title>iLogic Half Section View Settings Value Offset</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-half-section-view-settings-value-offset/m-p/12567990#M163879</link>
      <description>&lt;P&gt;&lt;SPAN&gt;How to preset value 5 via iLogic?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2024-02-18_22h06_27.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1327557iC20C78159F45F457/image-size/large?v=v2&amp;amp;px=999" role="button" title="2024-02-18_22h06_27.png" alt="2024-02-18_22h06_27.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;asm&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;AssemblyDocument&lt;/SPAN&gt; = &lt;SPAN&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;asmDef&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;AssemblyComponentDefinition&lt;/SPAN&gt; = &lt;SPAN&gt;asm&lt;/SPAN&gt;.&lt;SPAN&gt;ComponentDefinition&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;viewRep&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;DesignViewRepresentation&lt;/SPAN&gt; = &lt;SPAN&gt;asmDef&lt;/SPAN&gt;.&lt;SPAN&gt;RepresentationsManager&lt;/SPAN&gt;.&lt;SPAN&gt;ActiveDesignViewRepresentation&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;wrkPlane&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;WorkPlane&lt;/SPAN&gt; = &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;CommandManager&lt;/SPAN&gt;.&lt;SPAN&gt;Pick&lt;/SPAN&gt;(&lt;SPAN&gt;SelectionFilterEnum&lt;/SPAN&gt;.&lt;SPAN&gt;kWorkPlaneFilter&lt;/SPAN&gt;, &lt;SPAN&gt;"Pick a Workplane"&lt;/SPAN&gt;)
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;rootPoint&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Point&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;xAxis&lt;/SPAN&gt;,&lt;SPAN&gt;yAxis&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;UnitVector&lt;/SPAN&gt;
&lt;SPAN&gt;wrkPlane&lt;/SPAN&gt;.&lt;SPAN&gt;GetPosition&lt;/SPAN&gt;(&lt;SPAN&gt;rootPoint&lt;/SPAN&gt;, &lt;SPAN&gt;xAxis&lt;/SPAN&gt;, &lt;SPAN&gt;yAxis&lt;/SPAN&gt;)
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;normal&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Vector&lt;/SPAN&gt; = &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;TransientGeometry&lt;/SPAN&gt;.&lt;SPAN&gt;CreateVector&lt;/SPAN&gt;(-10)
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;plane1&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Plane&lt;/SPAN&gt; = &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;TransientGeometry&lt;/SPAN&gt;.&lt;SPAN&gt;CreatePlane&lt;/SPAN&gt;(&lt;SPAN&gt;rootPoint&lt;/SPAN&gt;, &lt;SPAN&gt;normal&lt;/SPAN&gt;)
&lt;SPAN&gt;viewRep&lt;/SPAN&gt;.&lt;SPAN&gt;SetSectionView&lt;/SPAN&gt;(&lt;SPAN&gt;SectionViewTypeEnum&lt;/SPAN&gt;.&lt;SPAN&gt;kHalfSectionViewType&lt;/SPAN&gt;, &lt;SPAN&gt;plane1&lt;/SPAN&gt;)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Feb 2024 21:11:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-half-section-view-settings-value-offset/m-p/12567990#M163879</guid>
      <dc:creator>dusan.naus.trz</dc:creator>
      <dc:date>2024-02-18T21:11:10Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Half Section View Settings Value Offset</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-half-section-view-settings-value-offset/m-p/12568154#M163881</link>
      <description>&lt;P&gt;If it works as is but with no offset, it looks like you just need to adjust the definition of rootPoint to include the offset in the desired direction. The root point lies on the transient plane, your code has it on the plane you select.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Feb 2024 00:11:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-half-section-view-settings-value-offset/m-p/12568154#M163881</guid>
      <dc:creator>nmunro</dc:creator>
      <dc:date>2024-02-19T00:11:19Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Half Section View Settings Value Offset</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-half-section-view-settings-value-offset/m-p/12568674#M163893</link>
      <description>&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;I tried it and it gives me errors.&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;&lt;SPAN class=""&gt;I can't redefine it to plain + Double value.&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;&lt;SPAN class=""&gt;I don't know how to redefine it.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Feb 2024 08:53:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-half-section-view-settings-value-offset/m-p/12568674#M163893</guid>
      <dc:creator>dusan.naus.trz</dc:creator>
      <dc:date>2024-02-19T08:53:22Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Half Section View Settings Value Offset</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-half-section-view-settings-value-offset/m-p/12569593#M163917</link>
      <description>&lt;P&gt;I made a few small edits to your rule and it seems to work well. See the embedded notes for suggestions on making it more generic. The offset point would also have to be calculated based on the selected plane normal.&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 asm As AssemblyDocument = ThisDoc.Document
Dim asmDef As AssemblyComponentDefinition = asm.ComponentDefinition
Dim viewRep As DesignViewRepresentation = asmDef.RepresentationsManager.ActiveDesignViewRepresentation
Dim wrkPlane As WorkPlane = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kWorkPlaneFilter, "Pick a Workplane")
Dim rootPoint As Point
Dim xAxis,yAxis As UnitVector
wrkPlane.GetPosition(rootPoint, xAxis, yAxis)

' The following is based on the selection of the assembly YZ plane by the user (or a parallel plane)
' To make this generic, you would need to get the normal for the selected plane (cross product of xAxis &amp;amp; yAxis vectors) 
Dim offset As Double = 5  ' 5cm offset
Dim planeBasePt As Point = ThisApplication.TransientGeometry.CreatePoint(rootPoint.X + offset, rootPoint.Y, rootPoint.Z)
' The calculated  plane normaln would replace this fixed vector
Dim planeNormal As Vector = ThisApplication.TransientGeometry.CreateVector(1, 0, 0)

' replaced root point with the offset plane definition
Dim plane1 As Plane = ThisApplication.TransientGeometry.CreatePlane(planeBasePt, planeNormal)
viewRep.SetSectionView(SectionViewTypeEnum.kHalfSectionViewType, plane1)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Feb 2024 17:48:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-half-section-view-settings-value-offset/m-p/12569593#M163917</guid>
      <dc:creator>nmunro</dc:creator>
      <dc:date>2024-02-19T17:48:09Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic Half Section View Settings Value Offset</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-half-section-view-settings-value-offset/m-p/12569765#M163925</link>
      <description>&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Hello,&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;&lt;SPAN class=""&gt;It's nice.&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Everything works.&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Thank you.&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;I am not yet aware of the relationships in the code between each other.&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;&lt;SPAN class=""&gt;I hope that one day it will come and I will understand the relationships in the code.&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Thank you.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Feb 2024 19:43:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-half-section-view-settings-value-offset/m-p/12569765#M163925</guid>
      <dc:creator>dusan.naus.trz</dc:creator>
      <dc:date>2024-02-19T19:43:45Z</dc:date>
    </item>
  </channel>
</rss>

