<?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 ViewLabels and stuff in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/viewlabels-and-stuff/m-p/13666017#M175318</link>
    <description>&lt;P&gt;I need to add prefixes to views through the style manager for an iLogic rule to work properly&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture d’écran 2025-06-04 115319.png" style="width: 507px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1540234i783E73F935BA3301/image-dimensions/507x345?v=v2" width="507" height="345" role="button" title="Capture d’écran 2025-06-04 115319.png" alt="Capture d’écran 2025-06-04 115319.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But this is causing some unwanted side effects&amp;nbsp; and I could not find a way to turn it off&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture d’écran 2025-06-04 115613.png" style="width: 499px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1540238iE907A2F2A471581D/image-dimensions/499x347?v=v2" width="499" height="347" role="button" title="Capture d’écran 2025-06-04 115613.png" alt="Capture d’écran 2025-06-04 115613.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And here's the rule in question :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="visual"&gt;' Librarie de code iLogic/VBA Métal Marquis
' Auteur: Mathieu Grenier
' Nom: Vues dépliées
' Catégorie: Règles de mises en plans
' Date: 2025-06-04
' Description: Place des vues dépliées pour chaque pièce de tolerie présente sur la feuille de dessin active
' Version: 1.0
' En développement: Oui
' Notes: 

Dim doc As DrawingDocument = ThisApplication.ActiveDocument
Dim sheet As Sheet = doc.ActiveSheet

Dim oOptions As NameValueMap = ThisApplication.TransientObjects.CreateNameValueMap
oOptions.Add("SheetMetalFoldedModel", False)

For Each view As DrawingView In sheet.DrawingViews
    Dim viewName As String = view.Name.ToUpper()

    ' Ignorer les vues projetées ou générées automatiquement
    If viewName.StartsWith("PROJ") _
    Or viewName.StartsWith("AUX") _
    Or viewName.StartsWith("COUPE") _
    Or viewName.StartsWith("DRAFT") _
	Or viewName.StartsWith("DETAIL") _
    Or viewName.StartsWith("VIEW") Then
        Continue For
    End If

    Try
        Dim refDoc As PartDocument = Nothing
        Try
            refDoc = View.ReferencedDocumentDescriptor.ReferencedDocument
        Catch
            Continue For
        End Try

        If Not refDoc Is Nothing Then
            Dim def As SheetMetalComponentDefinition = Nothing
            Try
                def = refDoc.ComponentDefinition
            Catch
                Continue For
            End Try

            If def.HasFlatPattern Then
                If def.FlatPattern Is Nothing Then
                    def.Unfold()
                    def.FlatPattern.ExitEdit()
                End If

                Dim pt As Point2d = ThisApplication.TransientGeometry.CreatePoint2d( _
                    View.Center.X, View.Center.Y + 10)

                Dim oFlatView As DrawingView = sheet.DrawingViews.AddBaseView( _
                    refDoc, _
                    pt, _
                    View.Scale, _
                    ViewOrientationTypeEnum.kFrontViewOrientation, _
                    DrawingViewStyleEnum.kHiddenLineRemovedDrawingViewStyle, _
                    , , oOptions)
					oFlatView.ShowLabel = False
                	oFlatView.Name = "FLAT_" &amp;amp; view.Name
            End If
        End If
    Catch
        Continue For
    End Try
Next&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So like, the rule need to ignore every view on the active drawing sheet that isn't a base view.&lt;/P&gt;&lt;P&gt;How can I achieve this, or just hide the view prefix from the section view lines and the detail bubble?&lt;/P&gt;</description>
    <pubDate>Wed, 04 Jun 2025 16:01:53 GMT</pubDate>
    <dc:creator>mgrenier2</dc:creator>
    <dc:date>2025-06-04T16:01:53Z</dc:date>
    <item>
      <title>ViewLabels and stuff</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/viewlabels-and-stuff/m-p/13666017#M175318</link>
      <description>&lt;P&gt;I need to add prefixes to views through the style manager for an iLogic rule to work properly&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture d’écran 2025-06-04 115319.png" style="width: 507px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1540234i783E73F935BA3301/image-dimensions/507x345?v=v2" width="507" height="345" role="button" title="Capture d’écran 2025-06-04 115319.png" alt="Capture d’écran 2025-06-04 115319.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But this is causing some unwanted side effects&amp;nbsp; and I could not find a way to turn it off&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture d’écran 2025-06-04 115613.png" style="width: 499px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1540238iE907A2F2A471581D/image-dimensions/499x347?v=v2" width="499" height="347" role="button" title="Capture d’écran 2025-06-04 115613.png" alt="Capture d’écran 2025-06-04 115613.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And here's the rule in question :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="visual"&gt;' Librarie de code iLogic/VBA Métal Marquis
' Auteur: Mathieu Grenier
' Nom: Vues dépliées
' Catégorie: Règles de mises en plans
' Date: 2025-06-04
' Description: Place des vues dépliées pour chaque pièce de tolerie présente sur la feuille de dessin active
' Version: 1.0
' En développement: Oui
' Notes: 

Dim doc As DrawingDocument = ThisApplication.ActiveDocument
Dim sheet As Sheet = doc.ActiveSheet

Dim oOptions As NameValueMap = ThisApplication.TransientObjects.CreateNameValueMap
oOptions.Add("SheetMetalFoldedModel", False)

For Each view As DrawingView In sheet.DrawingViews
    Dim viewName As String = view.Name.ToUpper()

    ' Ignorer les vues projetées ou générées automatiquement
    If viewName.StartsWith("PROJ") _
    Or viewName.StartsWith("AUX") _
    Or viewName.StartsWith("COUPE") _
    Or viewName.StartsWith("DRAFT") _
	Or viewName.StartsWith("DETAIL") _
    Or viewName.StartsWith("VIEW") Then
        Continue For
    End If

    Try
        Dim refDoc As PartDocument = Nothing
        Try
            refDoc = View.ReferencedDocumentDescriptor.ReferencedDocument
        Catch
            Continue For
        End Try

        If Not refDoc Is Nothing Then
            Dim def As SheetMetalComponentDefinition = Nothing
            Try
                def = refDoc.ComponentDefinition
            Catch
                Continue For
            End Try

            If def.HasFlatPattern Then
                If def.FlatPattern Is Nothing Then
                    def.Unfold()
                    def.FlatPattern.ExitEdit()
                End If

                Dim pt As Point2d = ThisApplication.TransientGeometry.CreatePoint2d( _
                    View.Center.X, View.Center.Y + 10)

                Dim oFlatView As DrawingView = sheet.DrawingViews.AddBaseView( _
                    refDoc, _
                    pt, _
                    View.Scale, _
                    ViewOrientationTypeEnum.kFrontViewOrientation, _
                    DrawingViewStyleEnum.kHiddenLineRemovedDrawingViewStyle, _
                    , , oOptions)
					oFlatView.ShowLabel = False
                	oFlatView.Name = "FLAT_" &amp;amp; view.Name
            End If
        End If
    Catch
        Continue For
    End Try
Next&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So like, the rule need to ignore every view on the active drawing sheet that isn't a base view.&lt;/P&gt;&lt;P&gt;How can I achieve this, or just hide the view prefix from the section view lines and the detail bubble?&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 16:01:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/viewlabels-and-stuff/m-p/13666017#M175318</guid>
      <dc:creator>mgrenier2</dc:creator>
      <dc:date>2025-06-04T16:01:53Z</dc:date>
    </item>
    <item>
      <title>Re: ViewLabels and stuff</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/viewlabels-and-stuff/m-p/13666174#M175321</link>
      <description>&lt;P&gt;Never mind, I figured it out&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 17:09:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/viewlabels-and-stuff/m-p/13666174#M175321</guid>
      <dc:creator>mgrenier2</dc:creator>
      <dc:date>2025-06-04T17:09:13Z</dc:date>
    </item>
    <item>
      <title>Re: ViewLabels and stuff</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/viewlabels-and-stuff/m-p/13690014#M175640</link>
      <description>&lt;P&gt;You should include your solution, and mark it as the solution to close out the thread.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jun 2025 22:24:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/viewlabels-and-stuff/m-p/13690014#M175640</guid>
      <dc:creator>C_Haines_ENG</dc:creator>
      <dc:date>2025-06-19T22:24:36Z</dc:date>
    </item>
    <item>
      <title>Re: ViewLabels and stuff</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/viewlabels-and-stuff/m-p/13705764#M175876</link>
      <description>&lt;P&gt;Is it really a solution if I just turned it off ? &lt;span class="lia-unicode-emoji" title=":face_with_tears_of_joy:"&gt;😂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Jul 2025 12:09:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/viewlabels-and-stuff/m-p/13705764#M175876</guid>
      <dc:creator>mgrenier2</dc:creator>
      <dc:date>2025-07-01T12:09:54Z</dc:date>
    </item>
    <item>
      <title>Re: ViewLabels and stuff</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/viewlabels-and-stuff/m-p/13707694#M175913</link>
      <description>&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":face_with_tears_of_joy:"&gt;😂&lt;/span&gt;I guess not, but you could just check what&amp;nbsp;&lt;EM&gt;type&amp;nbsp;&lt;/EM&gt;of view you were on instead of grabbing a prefix.&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oDoc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;DrawingDocument&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;oSheet&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Sheet&lt;/SPAN&gt; = &lt;SPAN&gt;oDoc&lt;/SPAN&gt;.&lt;SPAN&gt;ActiveSheet&lt;/SPAN&gt;

&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;Each&lt;/SPAN&gt; &lt;SPAN&gt;oView&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;DrawingView&lt;/SPAN&gt; &lt;SPAN&gt;In&lt;/SPAN&gt; &lt;SPAN&gt;oSheet&lt;/SPAN&gt;.&lt;SPAN&gt;DrawingViews&lt;/SPAN&gt;
	
	&lt;SPAN&gt;MsgBox&lt;/SPAN&gt;(&lt;SPAN&gt;oView&lt;/SPAN&gt;.&lt;SPAN&gt;ViewType&lt;/SPAN&gt;.&lt;SPAN&gt;ToString&lt;/SPAN&gt;)
	
&lt;SPAN&gt;Next&lt;/SPAN&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 02 Jul 2025 12:11:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/viewlabels-and-stuff/m-p/13707694#M175913</guid>
      <dc:creator>C_Haines_ENG</dc:creator>
      <dc:date>2025-07-02T12:11:40Z</dc:date>
    </item>
  </channel>
</rss>

