<?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: Visibility of view off sheet in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/visibility-of-view-off-sheet/m-p/9057785#M101705</link>
    <description>&lt;P&gt;try this code:&lt;/P&gt;&lt;P&gt;[iLogic]&lt;/P&gt;&lt;PRE&gt;Dim doc As DrawingDocument = ThisApplication.ActiveDocument

For Each sheet As Sheet In doc.Sheets
    Dim sheetHeight As Double = sheet.Height
    Dim sheetWidth As Double = sheet.Width
    For Each view As DrawingView In sheet.DrawingViews
        Dim viewMinX = view.Position.X + view.Width / 2
        Dim viewMaxX = view.Position.X - view.Width / 2
        Dim viewMinY = view.Position.Y + view.Height / 2
        Dim viewMaxY = view.Position.Y - view.Height / 2

        If (sheetWidth &amp;lt; viewMaxX) Or
               (sheetHeight &amp;lt; viewMaxY) Or
               (viewMinX &amp;lt; 0) Or
               (viewMinY &amp;lt; 0) Then

            view.Suppressed = True
        Else
            view.Suppressed = False
        End If
    Next
Next&lt;/PRE&gt;&lt;P&gt;pay attention it will only suppress views that are entirely outside the sheet&lt;/P&gt;</description>
    <pubDate>Mon, 30 Sep 2019 18:51:31 GMT</pubDate>
    <dc:creator>JelteDeJong</dc:creator>
    <dc:date>2019-09-30T18:51:31Z</dc:date>
    <item>
      <title>Visibility of view off sheet</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/visibility-of-view-off-sheet/m-p/9057578#M101701</link>
      <description>&lt;P&gt;I'm exporting drawings to .dxf to import into Solidworks (because that's what the customer wants), but some drawings have views that are outside of the paperspace / sheet.&amp;nbsp; They need to exist for reference, or to drive some extra sections, etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know there are ways to manually suppress/hide them, but I have an ilogic macro that hides various things, exports the .dxf with appropriate settings, etc. so I'd like to add the suppression of all views that are off the paper.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If there's an option in the .dxf that accomplishes this, I'm fine with that too.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2019 17:29:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/visibility-of-view-off-sheet/m-p/9057578#M101701</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-09-30T17:29:34Z</dc:date>
    </item>
    <item>
      <title>Re: Visibility of view off sheet</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/visibility-of-view-off-sheet/m-p/9057785#M101705</link>
      <description>&lt;P&gt;try this code:&lt;/P&gt;&lt;P&gt;[iLogic]&lt;/P&gt;&lt;PRE&gt;Dim doc As DrawingDocument = ThisApplication.ActiveDocument

For Each sheet As Sheet In doc.Sheets
    Dim sheetHeight As Double = sheet.Height
    Dim sheetWidth As Double = sheet.Width
    For Each view As DrawingView In sheet.DrawingViews
        Dim viewMinX = view.Position.X + view.Width / 2
        Dim viewMaxX = view.Position.X - view.Width / 2
        Dim viewMinY = view.Position.Y + view.Height / 2
        Dim viewMaxY = view.Position.Y - view.Height / 2

        If (sheetWidth &amp;lt; viewMaxX) Or
               (sheetHeight &amp;lt; viewMaxY) Or
               (viewMinX &amp;lt; 0) Or
               (viewMinY &amp;lt; 0) Then

            view.Suppressed = True
        Else
            view.Suppressed = False
        End If
    Next
Next&lt;/PRE&gt;&lt;P&gt;pay attention it will only suppress views that are entirely outside the sheet&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2019 18:51:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/visibility-of-view-off-sheet/m-p/9057785#M101705</guid>
      <dc:creator>JelteDeJong</dc:creator>
      <dc:date>2019-09-30T18:51:31Z</dc:date>
    </item>
    <item>
      <title>Re: Visibility of view off sheet</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/visibility-of-view-off-sheet/m-p/9057786#M101706</link>
      <description>&lt;P&gt;&lt;FONT&gt;&amp;nbsp; Dim vBase As DrawingView = something you found to be off the page by looking at view position (top left) and view width and view height, or just view range box, then comparing to sheet size/border.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; vBase.Suppressed = True&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2019 18:51:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/visibility-of-view-off-sheet/m-p/9057786#M101706</guid>
      <dc:creator>JamieVJohnson2</dc:creator>
      <dc:date>2019-09-30T18:51:42Z</dc:date>
    </item>
    <item>
      <title>Re: Visibility of view off sheet</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/visibility-of-view-off-sheet/m-p/9057836#M101710</link>
      <description>&lt;P&gt;Thank you for the quick and complete response!&lt;/P&gt;&lt;P&gt;This is exactly what I was looking for.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2019 19:10:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/visibility-of-view-off-sheet/m-p/9057836#M101710</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-09-30T19:10:07Z</dc:date>
    </item>
  </channel>
</rss>

