<?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: DRAWING VIEW IDENTIFIER: AUTOMATICALLY DETECT AND LABEL FROM VIEW CUBE in Inventor Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-forum/drawing-view-identifier-automatically-detect-and-label-from-view/m-p/12098515#M41458</link>
    <description>&lt;P&gt;Seems like I jumped to a conclusion a little too quickly. The code from&amp;nbsp;&lt;A href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/9307348" target="_blank" rel="noopener"&gt;@Peter.PopovskiYNYN8&lt;/A&gt;&amp;nbsp;overrides all drawing views (detail views, section etc.) so when you save you get "TOP-TOP (1:3)" Instead of "A-A (1:3)"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code from&amp;nbsp;&lt;SPAN class=""&gt;&lt;A href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/564136" target="_self"&gt;&lt;SPAN class=""&gt;Ralf_Krieg&lt;/SPAN&gt;&lt;/A&gt;&amp;nbsp;works much better, since it does not override ALL the views.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;This is the code:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Dim tmpSheet As Sheet = ThisDrawing.ActiveSheet.Sheet
Dim tmpView As DrawingView
For Each tmpView In tmpSheet.DrawingViews
		Dim myDrawingViewName As String = ""
		If tmpView.Type = ObjectTypeEnum.kDrawingViewObject Then
			'Encapsulat the rotation of drawing view in a transaction
			Dim oTrans As Transaction
			oTrans = ThisApplication.TransactionManager.StartTransaction(ThisDrawing.Document, "Rotate Drawing View temp")
			
			' Set rotation to 0
			If tmpView.Camera.ViewOrientationType = ViewOrientationTypeEnum.kArbitraryViewOrientation Then
				If tmpView.Rotation&amp;lt;&amp;gt;0 Then
					tmpView.Rotation = 0
				End If
	    	End If
			
	        Select Case tmpView.Camera.ViewOrientationType
	            Case ViewOrientationTypeEnum.kBackViewOrientation
	                myDrawingViewName = "BACK VIEW"
	            Case ViewOrientationTypeEnum.kBottomViewOrientation
	                myDrawingViewName = "BOTTOM VIEW"
	            Case ViewOrientationTypeEnum.kFrontViewOrientation
	                myDrawingViewName = "FRONT VIEW"
	            Case ViewOrientationTypeEnum.kIsoBottomLeftViewOrientation
	                myDrawingViewName = "ISOMETRIC VIEW"
	            Case ViewOrientationTypeEnum.kIsoBottomRightViewOrientation
	                myDrawingViewName = "ISOMETRIC VIEW"
	            Case ViewOrientationTypeEnum.kIsoTopLeftViewOrientation
	                myDrawingViewName = "ISOMETRIC VIEW"
	            Case ViewOrientationTypeEnum.kIsoTopRightViewOrientation
	                myDrawingViewName = "ISOMETRIC VIEW"
	            Case ViewOrientationTypeEnum.kLeftViewOrientation
	                myDrawingViewName = "SIDE VIEW"
	            Case ViewOrientationTypeEnum.kRightViewOrientation
	                myDrawingViewName = "SIDE VIEW"
	            Case ViewOrientationTypeEnum.kTopViewOrientation
	                myDrawingViewName = "TOP VIEW"
	            Case Else
	                myDrawingViewName = ""
	            End Select
				
			' Abort the transaction so everything is rolled back like before the transaction starts
			oTrans.Abort 
			
	        If Not myDrawingViewName = "" Then
	            tmpView.Name = myDrawingViewName
	        End If		
			If tmpView.IsFlatPatternView =True Then
	           tmpView.Name = "FLAT PATTERN"
	        End If
	    End If
	    myDrawingViewName = ""
Next&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 13 Jul 2023 06:31:26 GMT</pubDate>
    <dc:creator>jmvanstaden29RJF</dc:creator>
    <dc:date>2023-07-13T06:31:26Z</dc:date>
    <item>
      <title>Drawing view identifier: automatically detect and label from view cube</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/drawing-view-identifier-automatically-detect-and-label-from-view/m-p/12096713#M41454</link>
      <description>&lt;P&gt;Hi Guys,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like to automate our drawing process as much as possible. I am looking for a way to get the view name ("LEFT") in the figure below, and automatically set it to the view identifier, so that when a view is placed it already has a label instead of "VIEW 1"&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-inline" image-alt="INVENTOR FORUM 0001.PNG" style="width: 816px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1239523i4ADFD85B5964B906/image-size/large?v=v2&amp;amp;px=999" role="button" title="INVENTOR FORUM 0001.PNG" alt="INVENTOR FORUM 0001.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jul 2023 15:05:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/drawing-view-identifier-automatically-detect-and-label-from-view/m-p/12096713#M41454</guid>
      <dc:creator>jmvanstaden29RJF</dc:creator>
      <dc:date>2023-07-12T15:05:37Z</dc:date>
    </item>
    <item>
      <title>Re: DRAWING VIEW IDENTIFIER: AUTOMATICALLY DETECT AND LABEL FROM VIEW CUBE</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/drawing-view-identifier-automatically-detect-and-label-from-view/m-p/12096748#M41455</link>
      <description>Perhaps this was a post best served at the iLogic/VBA forum for Inventor.&lt;BR /&gt;&lt;BR /&gt;Anyhow, here's what I found there that might work for you:&lt;BR /&gt;&lt;A href="https://forums.autodesk.com/t5/inventor-ilogic-and-vb-net-forum/base-and-projected-view-label-name-to-match-orientation-name/td-p/3432701" target="_blank"&gt;https://forums.autodesk.com/t5/inventor-ilogic-and-vb-net-forum/base-and-projected-view-label-name-to-match-orientation-name/td-p/3432701&lt;/A&gt;&lt;BR /&gt;Or:&lt;BR /&gt;&lt;A href="https://forums.autodesk.com/t5/inventor-ilogic-and-vb-net-forum/drawing-view-labels/td-p/10094985" target="_blank"&gt;https://forums.autodesk.com/t5/inventor-ilogic-and-vb-net-forum/drawing-view-labels/td-p/10094985&lt;/A&gt;&lt;BR /&gt;And more stuff possibly still useful here:&lt;BR /&gt;&lt;A href="https://forums.autodesk.com/t5/inventor-ilogic-and-vb-net-forum/automatic-drawing-view-label/td-p/9187081" target="_blank"&gt;https://forums.autodesk.com/t5/inventor-ilogic-and-vb-net-forum/automatic-drawing-view-label/td-p/9187081&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;I'd try all three and variations of those solutions.</description>
      <pubDate>Wed, 12 Jul 2023 13:59:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/drawing-view-identifier-automatically-detect-and-label-from-view/m-p/12096748#M41455</guid>
      <dc:creator>Gabriel_Watson</dc:creator>
      <dc:date>2023-07-12T13:59:34Z</dc:date>
    </item>
    <item>
      <title>Re: DRAWING VIEW IDENTIFIER: AUTOMATICALLY DETECT AND LABEL FROM VIEW CUBE</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/drawing-view-identifier-automatically-detect-and-label-from-view/m-p/12098455#M41456</link>
      <description>&lt;P&gt;Hi Gabriel,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found the following code from&amp;nbsp;&lt;A href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/9307348" target="_blank" rel="noopener"&gt;@Peter.PopovskiYNYN8 :&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Dim oDoc As DrawingDocument = ThisDrawing.Document
Dim oViews As DrawingViews
Dim oOrientType As ViewOrientationTypeEnum
Dim oOrigViewName As String
Dim oNewViewName As String
For Each oSheet As Sheet In oDoc.Sheets
	oViews = oSheet.DrawingViews
	For Each oView As DrawingView In oViews
		oOrientType = oView.Camera.ViewOrientationType
		oOrigViewName = oView.Name
		oNewViewName = Mid(oOrientType.ToString, 2, Len(oOrientType.ToString) -16)
		oView.ShowLabel = True
		oView.Name = oNewViewName.ToUpper
	Next
Next&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This works perfectly. I set the rule to run after a save.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One flaw: it does not update when an already placed view is modified (if a "FRONT" is rotated to a "LEFT" it still shows "FRONT"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I can live with this.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2023 06:06:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/drawing-view-identifier-automatically-detect-and-label-from-view/m-p/12098455#M41456</guid>
      <dc:creator>jmvanstaden29RJF</dc:creator>
      <dc:date>2023-07-13T06:06:40Z</dc:date>
    </item>
    <item>
      <title>Re: DRAWING VIEW IDENTIFIER: AUTOMATICALLY DETECT AND LABEL FROM VIEW CUBE</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/drawing-view-identifier-automatically-detect-and-label-from-view/m-p/12098461#M41457</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="INVENTOR FORUM 0002.PNG" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1239837i8E7D01C7A7D81311/image-size/medium?v=v2&amp;amp;px=400" role="button" title="INVENTOR FORUM 0002.PNG" alt="INVENTOR FORUM 0002.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2023 06:09:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/drawing-view-identifier-automatically-detect-and-label-from-view/m-p/12098461#M41457</guid>
      <dc:creator>jmvanstaden29RJF</dc:creator>
      <dc:date>2023-07-13T06:09:21Z</dc:date>
    </item>
    <item>
      <title>Re: DRAWING VIEW IDENTIFIER: AUTOMATICALLY DETECT AND LABEL FROM VIEW CUBE</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/drawing-view-identifier-automatically-detect-and-label-from-view/m-p/12098515#M41458</link>
      <description>&lt;P&gt;Seems like I jumped to a conclusion a little too quickly. The code from&amp;nbsp;&lt;A href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/9307348" target="_blank" rel="noopener"&gt;@Peter.PopovskiYNYN8&lt;/A&gt;&amp;nbsp;overrides all drawing views (detail views, section etc.) so when you save you get "TOP-TOP (1:3)" Instead of "A-A (1:3)"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code from&amp;nbsp;&lt;SPAN class=""&gt;&lt;A href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/564136" target="_self"&gt;&lt;SPAN class=""&gt;Ralf_Krieg&lt;/SPAN&gt;&lt;/A&gt;&amp;nbsp;works much better, since it does not override ALL the views.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;This is the code:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Dim tmpSheet As Sheet = ThisDrawing.ActiveSheet.Sheet
Dim tmpView As DrawingView
For Each tmpView In tmpSheet.DrawingViews
		Dim myDrawingViewName As String = ""
		If tmpView.Type = ObjectTypeEnum.kDrawingViewObject Then
			'Encapsulat the rotation of drawing view in a transaction
			Dim oTrans As Transaction
			oTrans = ThisApplication.TransactionManager.StartTransaction(ThisDrawing.Document, "Rotate Drawing View temp")
			
			' Set rotation to 0
			If tmpView.Camera.ViewOrientationType = ViewOrientationTypeEnum.kArbitraryViewOrientation Then
				If tmpView.Rotation&amp;lt;&amp;gt;0 Then
					tmpView.Rotation = 0
				End If
	    	End If
			
	        Select Case tmpView.Camera.ViewOrientationType
	            Case ViewOrientationTypeEnum.kBackViewOrientation
	                myDrawingViewName = "BACK VIEW"
	            Case ViewOrientationTypeEnum.kBottomViewOrientation
	                myDrawingViewName = "BOTTOM VIEW"
	            Case ViewOrientationTypeEnum.kFrontViewOrientation
	                myDrawingViewName = "FRONT VIEW"
	            Case ViewOrientationTypeEnum.kIsoBottomLeftViewOrientation
	                myDrawingViewName = "ISOMETRIC VIEW"
	            Case ViewOrientationTypeEnum.kIsoBottomRightViewOrientation
	                myDrawingViewName = "ISOMETRIC VIEW"
	            Case ViewOrientationTypeEnum.kIsoTopLeftViewOrientation
	                myDrawingViewName = "ISOMETRIC VIEW"
	            Case ViewOrientationTypeEnum.kIsoTopRightViewOrientation
	                myDrawingViewName = "ISOMETRIC VIEW"
	            Case ViewOrientationTypeEnum.kLeftViewOrientation
	                myDrawingViewName = "SIDE VIEW"
	            Case ViewOrientationTypeEnum.kRightViewOrientation
	                myDrawingViewName = "SIDE VIEW"
	            Case ViewOrientationTypeEnum.kTopViewOrientation
	                myDrawingViewName = "TOP VIEW"
	            Case Else
	                myDrawingViewName = ""
	            End Select
				
			' Abort the transaction so everything is rolled back like before the transaction starts
			oTrans.Abort 
			
	        If Not myDrawingViewName = "" Then
	            tmpView.Name = myDrawingViewName
	        End If		
			If tmpView.IsFlatPatternView =True Then
	           tmpView.Name = "FLAT PATTERN"
	        End If
	    End If
	    myDrawingViewName = ""
Next&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2023 06:31:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/drawing-view-identifier-automatically-detect-and-label-from-view/m-p/12098515#M41458</guid>
      <dc:creator>jmvanstaden29RJF</dc:creator>
      <dc:date>2023-07-13T06:31:26Z</dc:date>
    </item>
    <item>
      <title>Re: DRAWING VIEW IDENTIFIER: AUTOMATICALLY DETECT AND LABEL FROM VIEW CUBE</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/drawing-view-identifier-automatically-detect-and-label-from-view/m-p/12098518#M41459</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="INVENTOR FORUM 0003.PNG" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1239853iC8F96C391CED3131/image-size/medium?v=v2&amp;amp;px=400" role="button" title="INVENTOR FORUM 0003.PNG" alt="INVENTOR FORUM 0003.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2023 06:32:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/drawing-view-identifier-automatically-detect-and-label-from-view/m-p/12098518#M41459</guid>
      <dc:creator>jmvanstaden29RJF</dc:creator>
      <dc:date>2023-07-13T06:32:02Z</dc:date>
    </item>
  </channel>
</rss>

