<?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: Problem creating transient geometry in part in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/problem-creating-transient-geometry-in-part/m-p/12651793#M165120</link>
    <description>&lt;P&gt;I tried the workplane rotate around edge.&lt;/P&gt;&lt;P&gt;I think it was workplanes.addbylineplaneandangle&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But the workplane creation keeps giving me an error when using input edge and face rather than axis and workplane.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tried transient geometry plane but i mess up with the inputs as well, keeps crashing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ideal would be if i could get a temporary face with maybe brep somehow.&lt;/P&gt;&lt;P&gt;Because I have a good code to get the real angle between 2 faces (not shortest angle between 2 infinite workplanes)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Im kinda frustrated on the failed attempts &lt;img class="lia-deferred-image lia-image-emoji" src="https://forums.autodesk.com/html/@B4D44A73814D7FC0D950DEDFACB97081/emoticons/1f642.png" alt=":slightly_smiling_face:" title=":slightly_smiling_face:" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The goal is to have a plane to measure with groundplane XY. And adjust the angle of the flange i want create next. Ideally visible for debugging.&lt;/P&gt;</description>
    <pubDate>Tue, 19 Mar 2024 20:18:07 GMT</pubDate>
    <dc:creator>Cadkunde.nl</dc:creator>
    <dc:date>2024-03-19T20:18:07Z</dc:date>
    <item>
      <title>Problem creating transient geometry in part</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/problem-creating-transient-geometry-in-part/m-p/12651302#M165106</link>
      <description>&lt;P&gt;Hello Forum,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a hard time getting the following.&lt;/P&gt;&lt;P&gt;I have a script that automates creating plates with flanges&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Problem: Some flanges that are angled +- 10 degrees from the orientation of the XY Plane (Ground plane)&lt;/P&gt;&lt;P&gt;Need to get the angle of the ground plane. For visual aestetics, but also dirt and such.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So before the flange is created, I want to make a "plane". So I can measure the angle from this plane to the ground plane. and adjust my angle before the flange is created.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The plane should be from the front face of the plate, angled from the top edge, then angled (90 deg for example)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I have a hard time with transient geometry / transientBRepp / Client Graphics&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think i need to create this using transientgeometry.createplane&lt;/P&gt;&lt;P&gt;For debugging i want this visual with client graphics&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cadkundenl_0-1710864210398.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1339090iC450C1BF7A8F45BD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cadkundenl_0-1710864210398.png" alt="Cadkundenl_0-1710864210398.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help/example is greatly appreciated&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2024 16:19:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/problem-creating-transient-geometry-in-part/m-p/12651302#M165106</guid>
      <dc:creator>Cadkunde.nl</dc:creator>
      <dc:date>2024-03-19T16:19:23Z</dc:date>
    </item>
    <item>
      <title>Re: Problem creating transient geometry in part</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/problem-creating-transient-geometry-in-part/m-p/12651400#M165108</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3133719"&gt;@Cadkunde.nl&lt;/a&gt;.&amp;nbsp; Are you attempting to provide a 'preview' of a feature before you create it?&amp;nbsp; Either way, creating a simple transient Plane object will not work for that purpose, because it has no size or outline.&amp;nbsp; Something else that you could likely get to look right might be a &lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=GUID-WorkPlane" target="_blank" rel="noopener"&gt;WorkPlane&lt;/A&gt;, because you can &lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=WorkPlane_SetSize" target="_blank" rel="noopener"&gt;control its size with two Point objects&lt;/A&gt;.&amp;nbsp; But if using it for preview purposes, you would wither need to turn its visibility off, or delete it once you were done with it.&amp;nbsp; There are several 'Add' type methods for creating a WorkPlane, starting from the&amp;nbsp;&lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=GUID-WorkPlanes" target="_blank" rel="noopener"&gt;WorkPlanes&lt;/A&gt;&amp;nbsp;object (Document.ComponentDefinition.WorkPlanes).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2024 16:52:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/problem-creating-transient-geometry-in-part/m-p/12651400#M165108</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2024-03-19T16:52:43Z</dc:date>
    </item>
    <item>
      <title>Re: Problem creating transient geometry in part</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/problem-creating-transient-geometry-in-part/m-p/12651793#M165120</link>
      <description>&lt;P&gt;I tried the workplane rotate around edge.&lt;/P&gt;&lt;P&gt;I think it was workplanes.addbylineplaneandangle&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But the workplane creation keeps giving me an error when using input edge and face rather than axis and workplane.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tried transient geometry plane but i mess up with the inputs as well, keeps crashing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ideal would be if i could get a temporary face with maybe brep somehow.&lt;/P&gt;&lt;P&gt;Because I have a good code to get the real angle between 2 faces (not shortest angle between 2 infinite workplanes)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Im kinda frustrated on the failed attempts &lt;img class="lia-deferred-image lia-image-emoji" src="https://forums.autodesk.com/html/@B4D44A73814D7FC0D950DEDFACB97081/emoticons/1f642.png" alt=":slightly_smiling_face:" title=":slightly_smiling_face:" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The goal is to have a plane to measure with groundplane XY. And adjust the angle of the flange i want create next. Ideally visible for debugging.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2024 20:18:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/problem-creating-transient-geometry-in-part/m-p/12651793#M165120</guid>
      <dc:creator>Cadkunde.nl</dc:creator>
      <dc:date>2024-03-19T20:18:07Z</dc:date>
    </item>
    <item>
      <title>Re: Problem creating transient geometry in part</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/problem-creating-transient-geometry-in-part/m-p/12654060#M165178</link>
      <description>&lt;P&gt;I might not be much help with the more complex &lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=GUID-TransientBRep" target="_blank" rel="noopener"&gt;TransientBRep&lt;/A&gt; &amp;amp; &lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=GUID-ClientGraphics" target="_blank" rel="noopener"&gt;ClientGraphics&lt;/A&gt;&amp;nbsp;type stuff.&amp;nbsp; I have only dabbled with the TransientBRep new body creation stuff (&lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=SurfaceBodyDefinition_CreateTransientSurfaceBody_Sample" target="_blank" rel="noopener"&gt;one API Sample here&lt;/A&gt;, includes both) a couple times for body copy type functionality.&amp;nbsp; And only barely dabbled with ClientGraphics stuff on a few brief occasions for very basic things like showing a point or text.&amp;nbsp; I just have not had the need to dig deeper into them at this point.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2024 17:08:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/problem-creating-transient-geometry-in-part/m-p/12654060#M165178</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2024-03-20T17:08:03Z</dc:date>
    </item>
    <item>
      <title>Re: Problem creating transient geometry in part</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/problem-creating-transient-geometry-in-part/m-p/12654706#M165183</link>
      <description>&lt;P&gt;This example creates a (very thin) box and aligns it with an edge that you selected.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JelteDeJong_0-1710974578921.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1339647iABC6C762A1367A0A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JelteDeJong_0-1710974578921.png" alt="JelteDeJong_0-1710974578921.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;LI-CODE lang="visual-basic"&gt;Public Sub Main()
    Dim oTg = ThisApplication.TransientGeometry

    Dim edge As Edge = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kPartEdgeFilter, "Select an edge.")
    Dim line As LineSegment = edge.Geometry

    Dim startPoint = line.StartPoint

    Dim translationVector = oTg.CreateVector(startPoint.X, startPoint.Y, startPoint.Z)
    Dim vector1 = oTg.CreateVector(0, 0, 1)
    Dim vector2 = line.Direction.AsVector()

    Dim matrix As Matrix = oTg.CreateMatrix()
    matrix.SetToRotateTo(vector1, vector2)
    matrix.SetTranslation(translationVector)

    Dim partDoc As PartDocument = ThisDoc.Document

    Dim transBRep As TransientBRep = ThisApplication.TransientBRep
    Dim transGeom As TransientGeometry = ThisApplication.TransientGeometry

    Dim boxMinPoint As Point = transGeom.CreatePoint(0, 0, 0)
    Dim boxMaxPoint As Point = transGeom.CreatePoint(10, 0.15, 50)

    Dim box As Box = transGeom.CreateBox()
    box.Extend(boxMinPoint)
    box.Extend(boxMaxPoint)

    Dim minBoxSurface As SurfaceBody = ThisApplication.TransientBRep.CreateSolidBlock(box)

    Dim cGraphics As ClientGraphics = CreateBox(partDoc, minBoxSurface, matrix)

    MsgBox("CHeck the preview")

    cGraphics.Delete()
End Sub

Private Function CreateBox(partDoc As Document, surface As Object, matrix As Matrix) As ClientGraphics
    Dim cGraphics As ClientGraphics = partDoc.ComponentDefinition.ClientGraphicsCollection.Add("OrientedRangeBox")
    Dim surfacesNode As GraphicsNode = cGraphics.AddNode(1)
    surfacesNode.Transformation = matrix

    Dim surfGraphics As SurfaceGraphics = surfacesNode.AddSurfaceGraphics(surface)
    Dim targetAppearance As Asset

    Try
        targetAppearance = partDoc.Assets.Item("Clear - Blue")
    Catch
        Dim sourceAppearance As Asset = ThisApplication.AssetLibraries.Item("314DE259-5443-4621-BFBD-1730C6CC9AE9").AppearanceAssets.Item("InvGen-001-1-2") ' "Clear - Blue"
        targetAppearance = sourceAppearance.CopyTo(partDoc)
    End Try

    surfacesNode.Appearance = targetAppearance

    ThisApplication.ActiveView.Update()

    Return cGraphics
End Function&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2024 22:44:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/problem-creating-transient-geometry-in-part/m-p/12654706#M165183</guid>
      <dc:creator>JelteDeJong</dc:creator>
      <dc:date>2024-03-20T22:44:49Z</dc:date>
    </item>
    <item>
      <title>Re: Problem creating transient geometry in part</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/problem-creating-transient-geometry-in-part/m-p/12655495#M165191</link>
      <description>&lt;P&gt;Thanks for all the help, I will delve into this.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Mar 2024 07:57:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/problem-creating-transient-geometry-in-part/m-p/12655495#M165191</guid>
      <dc:creator>Cadkunde.nl</dc:creator>
      <dc:date>2024-03-21T07:57:44Z</dc:date>
    </item>
    <item>
      <title>Re: Problem creating transient geometry in part</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/problem-creating-transient-geometry-in-part/m-p/12655533#M165193</link>
      <description>&lt;P&gt;In my case I need Brep instead of client graphics. (for measuring, then deleting)&lt;/P&gt;&lt;P&gt;Also need to look better at vectors and matrix.&lt;/P&gt;&lt;P&gt;I worked with all kinds of things in the API, but this area gives me headaches, and avoided it a little until now.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Time to fully understand these components. I got good examples in both your replies to start thanks to you guys.&lt;/P&gt;&lt;P&gt;I think I'll manage from here.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Mar 2024 08:22:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/problem-creating-transient-geometry-in-part/m-p/12655533#M165193</guid>
      <dc:creator>Cadkunde.nl</dc:creator>
      <dc:date>2024-03-21T08:22:32Z</dc:date>
    </item>
    <item>
      <title>Re: Problem creating transient geometry in part</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/problem-creating-transient-geometry-in-part/m-p/12655695#M165194</link>
      <description>&lt;P&gt;With the examples I built the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm able to make a solid feature that I can angle much like a flange, and be able to measure.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;Public&lt;/SPAN&gt; &lt;SPAN&gt;Sub&lt;/SPAN&gt; &lt;SPAN&gt;Main&lt;/SPAN&gt;()
	&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;partDoc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;PartDocument&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;oCompDef&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;PartComponentDefinition&lt;/SPAN&gt; = &lt;SPAN&gt;partDoc&lt;/SPAN&gt;.&lt;SPAN&gt;ComponentDefinition&lt;/SPAN&gt;
	
    &lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;transBRep&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;TransientBRep&lt;/SPAN&gt; = &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;TransientBRep&lt;/SPAN&gt;
    &lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;transGeom&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;TransientGeometry&lt;/SPAN&gt; = &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;TransientGeometry&lt;/SPAN&gt;

    &lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;edge&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Edge&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;kPartEdgeFilter&lt;/SPAN&gt;, &lt;SPAN&gt;"Select an edge."&lt;/SPAN&gt;)
	&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;egdeLength&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Double&lt;/SPAN&gt; = &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;MeasureTools&lt;/SPAN&gt;.&lt;SPAN&gt;GetMinimumDistance&lt;/SPAN&gt;(&lt;SPAN&gt;edge&lt;/SPAN&gt;.&lt;SPAN&gt;StartVertex&lt;/SPAN&gt;, &lt;SPAN&gt;edge&lt;/SPAN&gt;.&lt;SPAN&gt;StopVertex&lt;/SPAN&gt;)
    &lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;line&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;LineSegment&lt;/SPAN&gt; = &lt;SPAN&gt;edge&lt;/SPAN&gt;.&lt;SPAN&gt;Geometry&lt;/SPAN&gt;

    &lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;startPoint&lt;/SPAN&gt; = &lt;SPAN&gt;line&lt;/SPAN&gt;.&lt;SPAN&gt;StartPoint&lt;/SPAN&gt;

    &lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;translationVector&lt;/SPAN&gt; = &lt;SPAN&gt;transGeom&lt;/SPAN&gt;.&lt;SPAN&gt;CreateVector&lt;/SPAN&gt;(&lt;SPAN&gt;startPoint&lt;/SPAN&gt;.&lt;SPAN&gt;X&lt;/SPAN&gt;, &lt;SPAN&gt;startPoint&lt;/SPAN&gt;.&lt;SPAN&gt;Y&lt;/SPAN&gt;, &lt;SPAN&gt;startPoint&lt;/SPAN&gt;.&lt;SPAN&gt;Z&lt;/SPAN&gt;)
    &lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;vector1&lt;/SPAN&gt; = &lt;SPAN&gt;transGeom&lt;/SPAN&gt;.&lt;SPAN&gt;CreateVector&lt;/SPAN&gt;(0, 0, 1)
    &lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;vector2&lt;/SPAN&gt; = &lt;SPAN&gt;line&lt;/SPAN&gt;.&lt;SPAN&gt;Direction&lt;/SPAN&gt;.&lt;SPAN&gt;AsVector&lt;/SPAN&gt;()

    &lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;matrix&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Matrix&lt;/SPAN&gt; = &lt;SPAN&gt;transGeom&lt;/SPAN&gt;.&lt;SPAN&gt;CreateMatrix&lt;/SPAN&gt;()
    &lt;SPAN&gt;matrix&lt;/SPAN&gt;.&lt;SPAN&gt;SetToRotateTo&lt;/SPAN&gt;(&lt;SPAN&gt;vector1&lt;/SPAN&gt;, &lt;SPAN&gt;vector2&lt;/SPAN&gt;)
    &lt;SPAN&gt;matrix&lt;/SPAN&gt;.&lt;SPAN&gt;SetTranslation&lt;/SPAN&gt;(&lt;SPAN&gt;translationVector&lt;/SPAN&gt;)

    &lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;boxMinPoint&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Point&lt;/SPAN&gt; = &lt;SPAN&gt;transGeom&lt;/SPAN&gt;.&lt;SPAN&gt;CreatePoint&lt;/SPAN&gt;(0, 0, 0)
	&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;boxMaxPoint&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Point&lt;/SPAN&gt; = &lt;SPAN&gt;transGeom&lt;/SPAN&gt;.&lt;SPAN&gt;CreatePoint&lt;/SPAN&gt;(0.3, -10, &lt;SPAN&gt;egdeLength&lt;/SPAN&gt;)
    &lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;box&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Box&lt;/SPAN&gt; = &lt;SPAN&gt;transGeom&lt;/SPAN&gt;.&lt;SPAN&gt;CreateBox&lt;/SPAN&gt;()
    &lt;SPAN&gt;box&lt;/SPAN&gt;.&lt;SPAN&gt;Extend&lt;/SPAN&gt;(&lt;SPAN&gt;boxMinPoint&lt;/SPAN&gt;)
    &lt;SPAN&gt;box&lt;/SPAN&gt;.&lt;SPAN&gt;Extend&lt;/SPAN&gt;(&lt;SPAN&gt;boxMaxPoint&lt;/SPAN&gt;)

    &lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oBody&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;SurfaceBody&lt;/SPAN&gt; = &lt;SPAN&gt;transBRep&lt;/SPAN&gt;.&lt;SPAN&gt;CreateSolidBlock&lt;/SPAN&gt;(&lt;SPAN&gt;box&lt;/SPAN&gt;)
	&lt;SPAN&gt;transBRep&lt;/SPAN&gt;.&lt;SPAN&gt;Transform&lt;/SPAN&gt;(&lt;SPAN&gt;oBody&lt;/SPAN&gt;, &lt;SPAN&gt;matrix&lt;/SPAN&gt;)
	
	&lt;SPAN&gt;matrix&lt;/SPAN&gt;.&lt;SPAN&gt;SetToRotation&lt;/SPAN&gt;(90*&lt;SPAN&gt;PI&lt;/SPAN&gt;/180, &lt;SPAN&gt;vector2&lt;/SPAN&gt;, &lt;SPAN&gt;line&lt;/SPAN&gt;.&lt;SPAN&gt;StartPoint&lt;/SPAN&gt;)
	&lt;SPAN&gt;transBRep&lt;/SPAN&gt;.&lt;SPAN&gt;Transform&lt;/SPAN&gt;(&lt;SPAN&gt;oBody&lt;/SPAN&gt;, &lt;SPAN&gt;matrix&lt;/SPAN&gt;)
	
	&lt;SPAN&gt;partDoc&lt;/SPAN&gt;.&lt;SPAN&gt;ComponentDefinition&lt;/SPAN&gt;.&lt;SPAN&gt;SetEndOfPartToTopOrBottom&lt;/SPAN&gt;(&lt;SPAN&gt;True&lt;/SPAN&gt;)
	&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oBaseFeature&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;NonParametricBaseFeature&lt;/SPAN&gt; = &lt;SPAN&gt;oCompDef&lt;/SPAN&gt;.&lt;SPAN&gt;Features&lt;/SPAN&gt;.&lt;SPAN&gt;NonParametricBaseFeatures&lt;/SPAN&gt;.&lt;SPAN&gt;Add&lt;/SPAN&gt;(&lt;SPAN&gt;oBody&lt;/SPAN&gt;)
	&lt;SPAN&gt;partDoc&lt;/SPAN&gt;.&lt;SPAN&gt;ComponentDefinition&lt;/SPAN&gt;.&lt;SPAN&gt;SetEndOfPartToTopOrBottom&lt;/SPAN&gt;(&lt;SPAN&gt;False&lt;/SPAN&gt;)
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;Sub&lt;/SPAN&gt;

&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is kinda what I wanted, but not sure if it is what I need.&lt;/P&gt;&lt;P&gt;Just need a 'face' in the position of the flange, before a flange is created, to measure it with workplane XY&lt;/P&gt;&lt;P&gt;I can measure the difference in angle in the direction of the flange.&lt;/P&gt;&lt;P&gt;If inventor measures an angle in the width direction of the flange, I can ignore it&lt;/P&gt;&lt;P&gt;If the angle of the flange is in +30deg/-30deg range of workplane XY, I should align the flange to be created with the workplane XY&lt;/P&gt;</description>
      <pubDate>Thu, 21 Mar 2024 09:45:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/problem-creating-transient-geometry-in-part/m-p/12655695#M165194</guid>
      <dc:creator>Cadkunde.nl</dc:creator>
      <dc:date>2024-03-21T09:45:23Z</dc:date>
    </item>
    <item>
      <title>Re: Problem creating transient geometry in part</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/problem-creating-transient-geometry-in-part/m-p/12655836#M165195</link>
      <description>&lt;P&gt;Figured out that oBody.face(4) is what I need to measure angle&lt;/P&gt;&lt;P&gt;I dont need to create the feature at all (except maybe for debugging)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So this is perfect. Thanks all&lt;/P&gt;</description>
      <pubDate>Thu, 21 Mar 2024 10:37:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/problem-creating-transient-geometry-in-part/m-p/12655836#M165195</guid>
      <dc:creator>Cadkunde.nl</dc:creator>
      <dc:date>2024-03-21T10:37:51Z</dc:date>
    </item>
  </channel>
</rss>

