<?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: Adding model sketches to a drawing in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/adding-model-sketches-to-a-drawing/m-p/2340483#M149547</link>
    <description>Oh well, I'm a lot further forward than when I started.  One click of a button and I get the flat pattern in the my DXF drawing template complete with part number and flat pattern sketch.  Ctrl+B and drag over the drawing gives me all the bend notes.  Not too much of a problem as I need to reposition the part number by hand anyway.&lt;BR /&gt;
&lt;BR /&gt;
Thanks for the input.</description>
    <pubDate>Tue, 16 Sep 2008 22:08:44 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2008-09-16T22:08:44Z</dc:date>
    <item>
      <title>Adding model sketches to a drawing</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/adding-model-sketches-to-a-drawing/m-p/2340474#M149538</link>
      <description>I'm a bit confused (happens frequently).  I want to add a sketch from a model into a drawing.  &lt;BR /&gt;
&lt;BR /&gt;
Basically I can to it except that the model is a sheet metal part, the drawing is of the flat pattern and the sketch I want to add is on the flat pattern.  What I end up doing is adding a sketch from the folded sheet metal part.&lt;BR /&gt;
&lt;BR /&gt;
How can I ensure that the sketch is added from the flat pattern??</description>
      <pubDate>Wed, 10 Sep 2008 17:53:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/adding-model-sketches-to-a-drawing/m-p/2340474#M149538</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-09-10T17:53:00Z</dc:date>
    </item>
    <item>
      <title>Re: Adding model sketches to a drawing</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/adding-model-sketches-to-a-drawing/m-p/2340475#M149539</link>
      <description>BUMP&lt;BR /&gt;
&lt;BR /&gt;
No comment anyone??</description>
      <pubDate>Tue, 16 Sep 2008 14:50:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/adding-model-sketches-to-a-drawing/m-p/2340475#M149539</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-09-16T14:50:22Z</dc:date>
    </item>
    <item>
      <title>Re: Adding model sketches to a drawing</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/adding-model-sketches-to-a-drawing/m-p/2340476#M149540</link>
      <description>Flat pattern sketches are not currently exposed via the API, so this won't &lt;BR /&gt;
be possible to do currently. This is high on our priorities for a future &lt;BR /&gt;
release.&lt;BR /&gt;
&lt;BR /&gt;
Sanjay-</description>
      <pubDate>Tue, 16 Sep 2008 18:12:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/adding-model-sketches-to-a-drawing/m-p/2340476#M149540</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-09-16T18:12:44Z</dc:date>
    </item>
    <item>
      <title>Re: Adding model sketches to a drawing</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/adding-model-sketches-to-a-drawing/m-p/2340477#M149541</link>
      <description>Thanks for the comment Sanjay.  Even if it is in the negative at least I know.</description>
      <pubDate>Tue, 16 Sep 2008 18:45:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/adding-model-sketches-to-a-drawing/m-p/2340477#M149541</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-09-16T18:45:17Z</dc:date>
    </item>
    <item>
      <title>Re: Adding model sketches to a drawing</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/adding-model-sketches-to-a-drawing/m-p/2340478#M149542</link>
      <description>There is one workaround until this is fully supported by the API.  You can &lt;BR /&gt;
use the API to select the browser node that represents the sketch and then &lt;BR /&gt;
run the "Get Model Sketches" command.  Below is one implementation that I &lt;BR /&gt;
tested.  Finding the node in the browser is the trickiest.  This just looks &lt;BR /&gt;
for the first node named "Flat Pattern".&lt;BR /&gt;
&lt;BR /&gt;
Public Sub GetFlatSketches()&lt;BR /&gt;
    Dim oDoc As DrawingDocument&lt;BR /&gt;
    Set oDoc = ThisApplication.ActiveDocument&lt;BR /&gt;
&lt;BR /&gt;
    Dim oTopNode As BrowserNode&lt;BR /&gt;
    Set oTopNode = oDoc.BrowserPanes.ActivePane.TopNode&lt;BR /&gt;
&lt;BR /&gt;
    Dim oFlatNode As BrowserNode&lt;BR /&gt;
    Set oFlatNode = FindNode(oTopNode, "Flat Pattern")&lt;BR /&gt;
    oFlatNode.EnsureVisible&lt;BR /&gt;
    oFlatNode.DoSelect&lt;BR /&gt;
&lt;BR /&gt;
    ThisApplication.CommandManager.ControlDefinitions.Item("DrawingGetModelSketchesCtxCmd").Execute&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
Private Function FindNode(ParentNode As BrowserNode, Name As String) As &lt;BR /&gt;
BrowserNode&lt;BR /&gt;
    Dim FoundNode As BrowserNode&lt;BR /&gt;
    Set FoundNode = Nothing&lt;BR /&gt;
&lt;BR /&gt;
    Dim oNode As BrowserNode&lt;BR /&gt;
    For Each oNode In ParentNode.BrowserNodes&lt;BR /&gt;
        If oNode.BrowserNodeDefinition.Label = Name Then&lt;BR /&gt;
            Set FoundNode = oNode&lt;BR /&gt;
            Exit For&lt;BR /&gt;
        Else&lt;BR /&gt;
            Set FoundNode = FindNode(oNode, Name)&lt;BR /&gt;
        End If&lt;BR /&gt;
    Next&lt;BR /&gt;
&lt;BR /&gt;
    If Not FoundNode Is Nothing Then&lt;BR /&gt;
        Set FindNode = FoundNode&lt;BR /&gt;
        Exit Function&lt;BR /&gt;
    End If&lt;BR /&gt;
End Function&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
Brian Ekins&lt;BR /&gt;
Autodesk Inventor API&lt;BR /&gt;
http://modthemachine.typepad.com</description>
      <pubDate>Tue, 16 Sep 2008 19:08:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/adding-model-sketches-to-a-drawing/m-p/2340478#M149542</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-09-16T19:08:34Z</dc:date>
    </item>
    <item>
      <title>Re: Adding model sketches to a drawing</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/adding-model-sketches-to-a-drawing/m-p/2340479#M149543</link>
      <description>Brian, that's fantastic!&lt;BR /&gt;
&lt;BR /&gt;
I'm just slowly chipping away at bits and pieces increasing the automation of repetitive tasks and here's a bit more I can add.&lt;BR /&gt;
&lt;BR /&gt;
Dare I ask another question?&lt;BR /&gt;
&lt;BR /&gt;
In the drawing of the flat pattern is there any way to automate adding the bend notes?  Currently I've assigned the bend note to a keyboard shortcut, then having selected it I select all the drawing by hand so all the bend notes appear in one go.</description>
      <pubDate>Tue, 16 Sep 2008 20:22:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/adding-model-sketches-to-a-drawing/m-p/2340479#M149543</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-09-16T20:22:52Z</dc:date>
    </item>
    <item>
      <title>Re: Adding model sketches to a drawing</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/adding-model-sketches-to-a-drawing/m-p/2340480#M149544</link>
      <description>I don't think there's a workaround for bend notes.  We got lucky with the &lt;BR /&gt;
sketch because the "Get Model Sketches" command only needs the current &lt;BR /&gt;
selection as input.  The Bend Notes command requires you to select items &lt;BR /&gt;
within the command.  It tried pre-selecting bend lines and then running the &lt;BR /&gt;
command but the selected bend lines are ignored.&lt;BR /&gt;
&lt;BR /&gt;
Supporting bend notes through the API is a high priority and something we &lt;BR /&gt;
plan to do in a future release.&lt;BR /&gt;
-- &lt;BR /&gt;
Brian Ekins&lt;BR /&gt;
Autodesk Inventor API&lt;BR /&gt;
http://modthemachine.typepad.com</description>
      <pubDate>Tue, 16 Sep 2008 20:29:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/adding-model-sketches-to-a-drawing/m-p/2340480#M149544</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-09-16T20:29:24Z</dc:date>
    </item>
    <item>
      <title>Re: Adding model sketches to a drawing</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/adding-model-sketches-to-a-drawing/m-p/2340481#M149545</link>
      <description>As I'd set the keyboard Ctrl+B to select the Bend Notes function, I'd hoped to use the SendKeys command to simulate this and then select all.  But it doesn't seem to like SendKeys.</description>
      <pubDate>Tue, 16 Sep 2008 21:16:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/adding-model-sketches-to-a-drawing/m-p/2340481#M149545</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-09-16T21:16:19Z</dc:date>
    </item>
    <item>
      <title>Re: Adding model sketches to a drawing</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/adding-model-sketches-to-a-drawing/m-p/2340482#M149546</link>
      <description>I don't think you can drive the selection through the keyboard, which is &lt;BR /&gt;
what you'd be doing using SendKeys.&lt;BR /&gt;
-- &lt;BR /&gt;
Brian Ekins&lt;BR /&gt;
Autodesk Inventor API&lt;BR /&gt;
http://modthemachine.typepad.com</description>
      <pubDate>Tue, 16 Sep 2008 21:32:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/adding-model-sketches-to-a-drawing/m-p/2340482#M149546</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-09-16T21:32:50Z</dc:date>
    </item>
    <item>
      <title>Re: Adding model sketches to a drawing</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/adding-model-sketches-to-a-drawing/m-p/2340483#M149547</link>
      <description>Oh well, I'm a lot further forward than when I started.  One click of a button and I get the flat pattern in the my DXF drawing template complete with part number and flat pattern sketch.  Ctrl+B and drag over the drawing gives me all the bend notes.  Not too much of a problem as I need to reposition the part number by hand anyway.&lt;BR /&gt;
&lt;BR /&gt;
Thanks for the input.</description>
      <pubDate>Tue, 16 Sep 2008 22:08:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/adding-model-sketches-to-a-drawing/m-p/2340483#M149547</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-09-16T22:08:44Z</dc:date>
    </item>
  </channel>
</rss>

