<?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: Sketch Symbol in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/sketch-symbol/m-p/7445783#M75644</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Interesting solution. &lt;BR /&gt;I thought that the Sheet was the parent of a sketched symbol. &lt;BR /&gt;&lt;BR /&gt;If that solution won't work. I would like to have an example drawing. To se how you have attached a symbol without leader. &lt;BR /&gt;When I tried that, it would not get attached just placed on the curve but after moving the view, the symbol did not move. &lt;BR /&gt;&lt;BR /&gt;I think it's possible to work our way up from a drawing curve to the view by code and not use my quick way of just checking the coordinate. But for that I really need to be attached. &lt;BR /&gt;&lt;BR /&gt;/Rikard</description>
    <pubDate>Mon, 09 Oct 2017 18:19:25 GMT</pubDate>
    <dc:creator>rikard.nilsson</dc:creator>
    <dc:date>2017-10-09T18:19:25Z</dc:date>
    <item>
      <title>Sketch Symbol</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/sketch-symbol/m-p/7439640#M75591</link>
      <description>&lt;P&gt;Is it possible to get the name of a view that a sketch symbol is attached to&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I know the symbol, can i get the curve its attached to, and from there get the view that the curve belongs to&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;cheers&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;MattH&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2017 12:05:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/sketch-symbol/m-p/7439640#M75591</guid>
      <dc:creator>MattH_Work</dc:creator>
      <dc:date>2017-10-06T12:05:06Z</dc:date>
    </item>
    <item>
      <title>Re: Sketch Symbol</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/sketch-symbol/m-p/7442459#M75628</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm assuming that the Sketched Symbol has a leader, becuase I don't know how to attach a symbol in any other way..&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But here is a quick way to find the view name. This is the one that I came up with anyway..&lt;/P&gt;
&lt;P&gt;I hope that it will help you..&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;Rikard&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oSheet&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Sheet&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;ThisDoc&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;Document&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;ActiveSheet&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;symbol&lt;/SPAN&gt; &lt;SPAN&gt;as&lt;/SPAN&gt; &lt;SPAN&gt;SketchedSymbol&lt;/SPAN&gt;
&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;item&lt;/SPAN&gt; &lt;SPAN&gt;in&lt;/SPAN&gt; &lt;SPAN&gt;oSheet&lt;/SPAN&gt;&lt;SPAN&g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PAN&gt;MidPoint&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;y&lt;/SPAN&gt; &lt;SPAN&gt;&amp;gt;=&lt;/SPAN&gt; &lt;SPAN&gt;BottomY&lt;/SPAN&gt; &lt;SPAN&gt;And&lt;/SPAN&gt; &lt;SPAN&gt;DC&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;MidPoint&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;y&lt;/SPAN&gt; &lt;SPAN&gt;&amp;lt;=&lt;/SPAN&gt; &lt;SPAN&gt;TopY&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt;
             &lt;SPAN&gt;MessageBox&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;Show&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;oView&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;Name&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;Title&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;
            &lt;SPAN&gt;Exit&lt;/SPAN&gt; &lt;SPAN&gt;For&lt;/SPAN&gt;
        &lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;
&lt;SPAN&gt;Next&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 07 Oct 2017 23:35:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/sketch-symbol/m-p/7442459#M75628</guid>
      <dc:creator>rikard.nilsson</dc:creator>
      <dc:date>2017-10-07T23:35:40Z</dc:date>
    </item>
    <item>
      <title>Re: Sketch Symbol</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/sketch-symbol/m-p/7444225#M75632</link>
      <description>&lt;P&gt;Unfortunately my symbols don't use leaders, they are attached directly to the geometry, also there are two symbols per sheet, and the views they are attached to are not necessarily it two distinct positions on the sheet, ie they may overlap which then causes your code to report the same view for both symbols&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks anyway&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Matt&lt;/P&gt;</description>
      <pubDate>Mon, 09 Oct 2017 08:27:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/sketch-symbol/m-p/7444225#M75632</guid>
      <dc:creator>MattH_Work</dc:creator>
      <dc:date>2017-10-09T08:27:38Z</dc:date>
    </item>
    <item>
      <title>Re: Sketch Symbol</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/sketch-symbol/m-p/7444584#M75635</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/448034"&gt;@MattH_Work&lt;/a&gt;&amp;nbsp;this&amp;nbsp;should work&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Dim oDoc As DrawingDocument
oDoc = ThisDoc.Document
Dim oSheet As Sheet
oSheet = oDoc.ActiveSheet

Dim symbol As SketchedSymbol
For Each symbol In oSheet.SketchedSymbols
    If symbol.Name = "test" Then
         MsgBox( symbol.Parent.DrawingViews(1).Name)
       
    End If
Next
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Oct 2017 11:26:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/sketch-symbol/m-p/7444584#M75635</guid>
      <dc:creator>frederic.vandenplas</dc:creator>
      <dc:date>2017-10-09T11:26:25Z</dc:date>
    </item>
    <item>
      <title>Re: Sketch Symbol</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/sketch-symbol/m-p/7445783#M75644</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Interesting solution. &lt;BR /&gt;I thought that the Sheet was the parent of a sketched symbol. &lt;BR /&gt;&lt;BR /&gt;If that solution won't work. I would like to have an example drawing. To se how you have attached a symbol without leader. &lt;BR /&gt;When I tried that, it would not get attached just placed on the curve but after moving the view, the symbol did not move. &lt;BR /&gt;&lt;BR /&gt;I think it's possible to work our way up from a drawing curve to the view by code and not use my quick way of just checking the coordinate. But for that I really need to be attached. &lt;BR /&gt;&lt;BR /&gt;/Rikard</description>
      <pubDate>Mon, 09 Oct 2017 18:19:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/sketch-symbol/m-p/7445783#M75644</guid>
      <dc:creator>rikard.nilsson</dc:creator>
      <dc:date>2017-10-09T18:19:25Z</dc:date>
    </item>
    <item>
      <title>Re: Sketch Symbol</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/sketch-symbol/m-p/7447364#M75666</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;If it attached to a line in the view, the parent is indeed the view, otherwise it could be the sheet</description>
      <pubDate>Tue, 10 Oct 2017 10:21:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/sketch-symbol/m-p/7447364#M75666</guid>
      <dc:creator>frederic.vandenplas</dc:creator>
      <dc:date>2017-10-10T10:21:13Z</dc:date>
    </item>
    <item>
      <title>Re: Sketch Symbol</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/sketch-symbol/m-p/7448796#M75674</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is not my thread.. But I've tested your solution and I can't get any other answer that the messagebox shows only the first view on the sheet.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've tested by placing a Symbol to a line the second view on the sheet.&lt;/P&gt;
&lt;P&gt;I've also tested by using a leader that points to a line in the second view and it still gives me the first view name..&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So I think I'm right when I say that the Parent to a symbol is the Sheet and not the view..&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's would be really nice to se how you solved this. Can you add an example?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/Rikard&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2017 18:09:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/sketch-symbol/m-p/7448796#M75674</guid>
      <dc:creator>rikard.nilsson</dc:creator>
      <dc:date>2017-10-10T18:09:31Z</dc:date>
    </item>
    <item>
      <title>Re: Sketch Symbol</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/sketch-symbol/m-p/7448977#M75677</link>
      <description>&lt;P&gt;There is no easy solution for this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I checked using the VBA editor to see what objects are accessible from the SketchedSymbol, and the parent is in fact always the sheet.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, there is never any view information that gets associated with the sketched symbol; the closest you can get is the coordinates of the leader points which attach it to something.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This leaves you with the whole trouble of trying to find what object on the sheet actually has a line or point at those same coordinates.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This means Rikard's solution is likely as close as you are going to get unless you find a better way to get the associated object for 2 given work points.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Good luck.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2017 19:14:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/sketch-symbol/m-p/7448977#M75677</guid>
      <dc:creator>MechMachineMan</dc:creator>
      <dc:date>2017-10-10T19:14:26Z</dc:date>
    </item>
  </channel>
</rss>

