<?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 Betreff: Use iLogic to change Reference Data options in drawing views in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/use-ilogic-to-change-reference-data-options-in-drawing-views/m-p/13217605#M102483</link>
    <description>&lt;P&gt;My comment related to the original question. We can't access the&amp;nbsp;DrawingView.ReferenceDataDisplayStyle property via the API. It is not even documented.&lt;/P&gt;&lt;P&gt;It works with VBA:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Sub HideReferenceLines(ByVal drawingView As drawingView)
    drawingView.ReferenceDataDisplayStyle = kDisplayStyleOff
End Sub&lt;/LI-CODE&gt;</description>
    <pubDate>Wed, 18 Dec 2024 07:17:33 GMT</pubDate>
    <dc:creator>c_hoppen</dc:creator>
    <dc:date>2024-12-18T07:17:33Z</dc:date>
    <item>
      <title>Use iLogic to change Reference Data options in drawing views</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/use-ilogic-to-change-reference-data-options-in-drawing-views/m-p/6949757#M102476</link>
      <description>&lt;P&gt;I am truing to write a quick iLogic rule to cycle through all sheets of a drawing and change the reference data options to the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Line Style: As Parts&lt;/P&gt;&lt;P&gt;Hidden Line Calculation: All Bodies&lt;/P&gt;&lt;P&gt;Margin: 100&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(see attached image)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the basic for each loops to go through each sheet and each drawing view but I'm not sure on the code required to change these values. There doesn't appear to be a reference anywhere of the commands available.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;</description>
      <pubDate>Thu, 16 Mar 2017 08:28:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/use-ilogic-to-change-reference-data-options-in-drawing-views/m-p/6949757#M102476</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-03-16T08:28:53Z</dc:date>
    </item>
    <item>
      <title>Re: Use iLogic to change Reference Data options in drawing views</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/use-ilogic-to-change-reference-data-options-in-drawing-views/m-p/6949959#M102477</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I also did not found anything under the drawingview object, so probably the api is not exposed.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Only Autodesk can confirm this i.&lt;/P&gt;
&lt;P&gt;@Anonymous&amp;nbsp;is there a list available of things that are not exposed, this would help us save lot of time &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Mar 2017 09:59:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/use-ilogic-to-change-reference-data-options-in-drawing-views/m-p/6949959#M102477</guid>
      <dc:creator>frederic.vandenplas</dc:creator>
      <dc:date>2017-03-16T09:59:53Z</dc:date>
    </item>
    <item>
      <title>Re: Use iLogic to change Reference Data options in drawing views</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/use-ilogic-to-change-reference-data-options-in-drawing-views/m-p/6950079#M102478</link>
      <description>&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If we can get Autodesk to confirm or deny it can be edited in iLogic that would be great.&lt;BR /&gt;&lt;BR /&gt;I found &lt;A href="https://forums.autodesk.com/t5/inventor-forum/ilogic-drawing-view-controls-in-drawing-files/td-p/5966436" target="_self"&gt;this&lt;/A&gt; post earlier which details the iLogic required for turning off "Definition in Base View". However I can't find the command that was called up in this iLogic anywhere so I'm hoping there are other hidden commands for what I require.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 16 Mar 2017 10:58:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/use-ilogic-to-change-reference-data-options-in-drawing-views/m-p/6950079#M102478</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-03-16T10:58:33Z</dc:date>
    </item>
    <item>
      <title>Re: Use iLogic to change Reference Data options in drawing views</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/use-ilogic-to-change-reference-data-options-in-drawing-views/m-p/7780517#M102479</link>
      <description>&lt;P&gt;Did anyone solve this?&lt;/P&gt;
&lt;P&gt;I'm looking for the exact same API objects. I'm using Inventor 2017.&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-left" image-alt="image.png" style="width: 379px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/463510i428574EB3E7A81B6/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2018 14:12:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/use-ilogic-to-change-reference-data-options-in-drawing-views/m-p/7780517#M102479</guid>
      <dc:creator>Josh_Hunt</dc:creator>
      <dc:date>2018-02-15T14:12:47Z</dc:date>
    </item>
    <item>
      <title>Re: Use iLogic to change Reference Data options in drawing views</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/use-ilogic-to-change-reference-data-options-in-drawing-views/m-p/10779530#M102480</link>
      <description>&lt;P&gt;I am currently looking for the same thing. 2020&lt;/P&gt;</description>
      <pubDate>Wed, 24 Nov 2021 15:58:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/use-ilogic-to-change-reference-data-options-in-drawing-views/m-p/10779530#M102480</guid>
      <dc:creator>maxim.teleguz</dc:creator>
      <dc:date>2021-11-24T15:58:06Z</dc:date>
    </item>
    <item>
      <title>Betreff: Use iLogic to change Reference Data options in drawing views</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/use-ilogic-to-change-reference-data-options-in-drawing-views/m-p/13216090#M102481</link>
      <description>&lt;P&gt;Me too. Dez. 17 2024. poor...!&lt;/P&gt;</description>
      <pubDate>Tue, 17 Dec 2024 14:34:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/use-ilogic-to-change-reference-data-options-in-drawing-views/m-p/13216090#M102481</guid>
      <dc:creator>c_hoppen</dc:creator>
      <dc:date>2024-12-17T14:34:43Z</dc:date>
    </item>
    <item>
      <title>Betreff: Use iLogic to change Reference Data options in drawing views</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/use-ilogic-to-change-reference-data-options-in-drawing-views/m-p/13216820#M102482</link>
      <description>&lt;P&gt;use this code in the meantime to calculate the suggested margin view size:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Sub Main()
    ' Check if the active document is a drawing
    Dim DrawingDoc As Inventor.DrawingDocument = ThisDrawing.Document
    If DrawingDoc.DocumentType &amp;lt;&amp;gt; kDrawingDocumentObject Then
        MessageBox.Show("Active document must be a drawing", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        Exit Sub
    End If

    ' Prompt the user to select a specific view
    Dim oApp As Inventor.Application = ThisApplication
    Dim SelectedView As Inventor.DrawingView = oApp.CommandManager.Pick(SelectionFilterEnum.kDrawingViewFilter, "Select a View")

    ' Check if a view was selected
    If IsNothing(SelectedView) Then
        MessageBox.Show("No view was selected. Exiting.", "Selection Cancelled", MessageBoxButtons.OK, MessageBoxIcon.Information)
        Exit Sub
    End If

    ' Retrieve the margin value for the selected view
    Dim MarginValue As Double = GetViewMargin(SelectedView)
    
    ' Display or use the margin value as needed
    MessageBox.Show("Margin value for selected view: " &amp;amp; MarginValue, "Margin Value", MessageBoxButtons.OK, MessageBoxIcon.Information)
End Sub

Private Function GetViewMargin(DwgView As Inventor.DrawingView) As Double
    ' Get the size of the drawing view
    Dim viewWidth As Double = DwgView.Width
    Dim viewHeight As Double = DwgView.Height
    Dim marginX As Double = viewWidth
    Dim marginY As Double = viewHeight
    ' Return the calculated margin value
    Return marginX ' Assuming uniform margin, you can return marginX or marginY
End Function&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 17 Dec 2024 20:26:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/use-ilogic-to-change-reference-data-options-in-drawing-views/m-p/13216820#M102482</guid>
      <dc:creator>maxim.teleguz</dc:creator>
      <dc:date>2024-12-17T20:26:25Z</dc:date>
    </item>
    <item>
      <title>Betreff: Use iLogic to change Reference Data options in drawing views</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/use-ilogic-to-change-reference-data-options-in-drawing-views/m-p/13217605#M102483</link>
      <description>&lt;P&gt;My comment related to the original question. We can't access the&amp;nbsp;DrawingView.ReferenceDataDisplayStyle property via the API. It is not even documented.&lt;/P&gt;&lt;P&gt;It works with VBA:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Sub HideReferenceLines(ByVal drawingView As drawingView)
    drawingView.ReferenceDataDisplayStyle = kDisplayStyleOff
End Sub&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 18 Dec 2024 07:17:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/use-ilogic-to-change-reference-data-options-in-drawing-views/m-p/13217605#M102483</guid>
      <dc:creator>c_hoppen</dc:creator>
      <dc:date>2024-12-18T07:17:33Z</dc:date>
    </item>
    <item>
      <title>Re: Use iLogic to change Reference Data options in drawing views</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/use-ilogic-to-change-reference-data-options-in-drawing-views/m-p/13218336#M102484</link>
      <description>&lt;P&gt;finally!&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;have code that will adjust the margin&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Sub Main()

    Dim oApp As Inventor.Application = ThisApplication

    ' Ensure a drawing document is active
    Dim oDrawingDoc As Inventor.DrawingDocument = Nothing
    If oApp.ActiveDocumentType = Inventor.DocumentTypeEnum.kDrawingDocumentObject Then
        oDrawingDoc = oApp.ActiveDocument
    Else
        MessageBox.Show("Please open a drawing document first.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        Exit Sub
    End If

    ' Prompt the user to select a specific view
    Dim SelectedView As Inventor.DrawingView = Nothing
    Try
        SelectedView = oApp.CommandManager.Pick(SelectionFilterEnum.kDrawingViewFilter, "Select a Detail or Section View")
    Catch ex As Exception
        MessageBox.Show("Error selecting view: " &amp;amp; ex.Message, "Selection Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        Exit Sub
    End Try

    ' Check if a view was selected
    If SelectedView Is Nothing Then
        MessageBox.Show("No view was selected. Exiting.", "Selection Cancelled", MessageBoxButtons.OK, MessageBoxIcon.Information)
        Exit Sub
    End If

    ' Calculate a margin from the selected view using your logic
    Dim CalculatedMargin As Double = GetViewMargin(SelectedView)

    ' If it’s a DetailDrawingView
    If TypeOf SelectedView Is DetailDrawingView Then
        Dim oDetailView As DetailDrawingView = CType(SelectedView, DetailDrawingView)
        Dim currentMargin As Double = oDetailView.Margin
        MessageBox.Show("Current Detail View Margin: " &amp;amp; currentMargin &amp;amp; vbCrLf &amp;amp; _
                        "Calculated Margin: " &amp;amp; CalculatedMargin, "Margin", MessageBoxButtons.OK, MessageBoxIcon.Information)

        ' Set the margin from the calculated value
        oDetailView.Margin = CalculatedMargin
        oDrawingDoc.Update()
        MessageBox.Show("Detail View Margin updated to " &amp;amp; CalculatedMargin, "Margin Updated", MessageBoxButtons.OK, MessageBoxIcon.Information)
        Exit Sub
    End If

    ' If it’s a SectionDrawingView
    If TypeOf SelectedView Is SectionDrawingView Then
        Dim oSectionView As SectionDrawingView = CType(SelectedView, SectionDrawingView)
        Dim currentMargin As Double = oSectionView.Margin
        MessageBox.Show("Current Section View Margin: " &amp;amp; currentMargin &amp;amp; vbCrLf &amp;amp; _
                        "Calculated Margin: " &amp;amp; CalculatedMargin, "Margin", MessageBoxButtons.OK, MessageBoxIcon.Information)

        ' Set the margin from the calculated value
        oSectionView.Margin = CalculatedMargin
        oDrawingDoc.Update()
        MessageBox.Show("Section View Margin updated to " &amp;amp; CalculatedMargin, "Margin Updated", MessageBoxButtons.OK, MessageBoxIcon.Information)
        Exit Sub
    End If

    ' If it’s neither detail nor section
    MessageBox.Show("Selected view is not a Detail or Section view. No margin property available.", "Not Applicable", MessageBoxButtons.OK, MessageBoxIcon.Information)

End Sub

Private Function GetViewMargin(DwgView As Inventor.DrawingView) As Double
    ' Example calculation:
    ' Currently, this just returns the width of the view as the margin.
    ' Adjust this logic to whatever makes sense for your scenario.
    
    Dim viewWidth As Double = DwgView.Width
    Dim viewHeight As Double = DwgView.Height
    ' For now, just return viewWidth. You can implement a more complex calculation if needed.
    Return viewWidth
End Function&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Dec 2024 13:40:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/use-ilogic-to-change-reference-data-options-in-drawing-views/m-p/13218336#M102484</guid>
      <dc:creator>maxim.teleguz</dc:creator>
      <dc:date>2024-12-18T13:40:04Z</dc:date>
    </item>
    <item>
      <title>Re: Use iLogic to change Reference Data options in drawing views</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/use-ilogic-to-change-reference-data-options-in-drawing-views/m-p/13390915#M102485</link>
      <description>&lt;P&gt;here is the code for the&amp;nbsp;&lt;SPAN&gt;Hidden Line Calculation: All Bodies&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DrawingView.&lt;STRONG&gt;HiddenLineCalculationForAllBodies&lt;/STRONG&gt;() As Boolean&lt;/P&gt;</description>
      <pubDate>Wed, 26 Mar 2025 05:44:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/use-ilogic-to-change-reference-data-options-in-drawing-views/m-p/13390915#M102485</guid>
      <dc:creator>donaldleigh</dc:creator>
      <dc:date>2025-03-26T05:44:31Z</dc:date>
    </item>
    <item>
      <title>Re: Use iLogic to change Reference Data options in drawing views</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/use-ilogic-to-change-reference-data-options-in-drawing-views/m-p/13391826#M102486</link>
      <description>&lt;P&gt;maybe&amp;nbsp;&lt;/P&gt;&lt;P&gt;DrawingView.SetDesignViewRepresentation Method&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Parent Object: &lt;/SPAN&gt;&lt;A href="https://help.autodesk.com/view/INVNTOR/2025/ENU/?guid=DrawingView" target="_blank" rel="noopener"&gt;DrawingView&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Description&lt;/P&gt;&lt;P class=""&gt;Method that sets a design view representation for a drawing view of an assembly. This method fails for drawing views of parts and presentations and in the case where the model (assembly) is unresolved.&lt;/P&gt;&lt;P&gt;Syntax&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;DrawingView.&lt;/SPAN&gt;&lt;STRONG&gt;SetDesignViewRepresentation&lt;/STRONG&gt;&lt;SPAN&gt;( &lt;/SPAN&gt;&lt;STRONG&gt;&lt;I&gt;Representation&lt;/I&gt;&lt;/STRONG&gt;&lt;SPAN&gt; As String, [&lt;/SPAN&gt;&lt;STRONG&gt;&lt;I&gt;Associative&lt;/I&gt;&lt;/STRONG&gt;&lt;SPAN&gt;] As Boolean )&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Mar 2025 12:50:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/use-ilogic-to-change-reference-data-options-in-drawing-views/m-p/13391826#M102486</guid>
      <dc:creator>Stakin</dc:creator>
      <dc:date>2025-03-26T12:50:09Z</dc:date>
    </item>
  </channel>
</rss>

