<?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 Bug when searching for drawing standard type views in Inventor Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-forum/bug-when-searching-for-drawing-standard-type-views/m-p/8549473#M197498</link>
    <description>&lt;P&gt;Greetings,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I founded a bug while working view iLogic and drawing views.&lt;/P&gt;
&lt;P&gt;In my iLogic I have a code "If oDrawingView.ViewType = DrawingViewTypeEnum.kStandardDrawingViewType Then", to find all standard (main) views on the drawing. It works great. But the problem comes when a person have projected views from standard (main) view and then deletes the main view and wants to keep projected one(s). So when this happens, Inventor should dedicate all non-dependable views as "Standard views". But since this does not happen, code just simply jumps over them, since they are still "projected views".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Maybe this is how it should be, but I think they should change view type if they do not have main view anymore, since they're their own main view now.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope I explained it good.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;ReneR&lt;/P&gt;</description>
    <pubDate>Fri, 25 Jan 2019 13:40:31 GMT</pubDate>
    <dc:creator>ReneRepina</dc:creator>
    <dc:date>2019-01-25T13:40:31Z</dc:date>
    <item>
      <title>Bug when searching for drawing standard type views</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/bug-when-searching-for-drawing-standard-type-views/m-p/8549473#M197498</link>
      <description>&lt;P&gt;Greetings,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I founded a bug while working view iLogic and drawing views.&lt;/P&gt;
&lt;P&gt;In my iLogic I have a code "If oDrawingView.ViewType = DrawingViewTypeEnum.kStandardDrawingViewType Then", to find all standard (main) views on the drawing. It works great. But the problem comes when a person have projected views from standard (main) view and then deletes the main view and wants to keep projected one(s). So when this happens, Inventor should dedicate all non-dependable views as "Standard views". But since this does not happen, code just simply jumps over them, since they are still "projected views".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Maybe this is how it should be, but I think they should change view type if they do not have main view anymore, since they're their own main view now.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope I explained it good.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;ReneR&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jan 2019 13:40:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/bug-when-searching-for-drawing-standard-type-views/m-p/8549473#M197498</guid>
      <dc:creator>ReneRepina</dc:creator>
      <dc:date>2019-01-25T13:40:31Z</dc:date>
    </item>
    <item>
      <title>Re: Bug when searching for drawing standard type views</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/bug-when-searching-for-drawing-standard-type-views/m-p/8550232#M197499</link>
      <description>&lt;P&gt;Hi ReneR,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Indeed, the behavior does not sound right to me. It can be a limitation or a bug. I will need to work with the project team to understand it better.&lt;/P&gt;
&lt;P&gt;Many thanks!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jan 2019 17:56:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/bug-when-searching-for-drawing-standard-type-views/m-p/8550232#M197499</guid>
      <dc:creator>johnsonshiue</dc:creator>
      <dc:date>2019-01-25T17:56:19Z</dc:date>
    </item>
    <item>
      <title>Re: Bug when searching for drawing standard type views</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/bug-when-searching-for-drawing-standard-type-views/m-p/8550546#M197500</link>
      <description>&lt;P&gt;While we investigate, here's a workaround. You can check the DrawingView.ParentView property. If the ViewType is projected but the ParentView is Nothing, then I think it's safe to treat it as a top-level view.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jan 2019 19:56:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/bug-when-searching-for-drawing-standard-type-views/m-p/8550546#M197500</guid>
      <dc:creator>MjDeck</dc:creator>
      <dc:date>2019-01-25T19:56:25Z</dc:date>
    </item>
    <item>
      <title>Re: Bug when searching for drawing standard type views</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/bug-when-searching-for-drawing-standard-type-views/m-p/8553239#M197501</link>
      <description>&lt;P&gt;Hi Rene,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If your code is to find all the independent drawing views you should not&amp;nbsp;rely on the standard view type, the standard view type just indicates it is a base view, your purpose is to find all the drawing views who have no parent view, so you just need to check the DrawingView.ParentView instead of the ViewType. You can find the Base view, Projected view and Auxiliary view all can be independent, so Mike's 'workaround' is the way you need to use in your code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this clears.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jan 2019 03:36:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/bug-when-searching-for-drawing-standard-type-views/m-p/8553239#M197501</guid>
      <dc:creator>YuhanZhang</dc:creator>
      <dc:date>2019-01-28T03:36:09Z</dc:date>
    </item>
    <item>
      <title>Re: Bug when searching for drawing standard type views</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/bug-when-searching-for-drawing-standard-type-views/m-p/8563129#M197502</link>
      <description>&lt;P&gt;Greetings,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I read through the comments and I added suggestions into the code. I came up with this solution (I cutted the rest of the code, since it is not needed for this topic).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This code works great, thank you all for suggestion. But there is one problem left. When I run this code, it flags isometric views too, but I do not want them to be flagged. The thing is isometric view is a "top parent", but it is also a projected view, if you projected it when you are placing a base view.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The code is:&lt;/P&gt;
&lt;PRE&gt;Dim oDrawingView As DrawingView

For Each oDrawingView In ThisApplication.ActiveDocument.ActiveSheet.DrawingViews
	
	'Check if a view has a parent, if not, do this.
	If oDrawingView.ParentView() Is Nothing Then
		oDrawingView.ShowLabel = True
		oDrawingView.Name = "Top parent view"
	Else
		'oDrawingView.ShowLabel = True
		'oDrawingView.Name = "Not top parent view"
	End If
	
Next&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;ReneR&lt;/P&gt;</description>
      <pubDate>Thu, 31 Jan 2019 08:13:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/bug-when-searching-for-drawing-standard-type-views/m-p/8563129#M197502</guid>
      <dc:creator>ReneRepina</dc:creator>
      <dc:date>2019-01-31T08:13:49Z</dc:date>
    </item>
    <item>
      <title>Re: Bug when searching for drawing standard type views</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/bug-when-searching-for-drawing-standard-type-views/m-p/8563134#M197503</link>
      <description>&lt;P&gt;Greetings Mike,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;that works for the all top parent views, but it also flags isometric views. In my situation I do not want isometric views to be flagged. But if somebody does not mind isometric views to get flagged, this will work.ž&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;ReneR&lt;/P&gt;</description>
      <pubDate>Thu, 31 Jan 2019 08:17:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/bug-when-searching-for-drawing-standard-type-views/m-p/8563134#M197503</guid>
      <dc:creator>ReneRepina</dc:creator>
      <dc:date>2019-01-31T08:17:18Z</dc:date>
    </item>
    <item>
      <title>Re: Bug when searching for drawing standard type views</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/bug-when-searching-for-drawing-standard-type-views/m-p/8563179#M197504</link>
      <description>&lt;P&gt;Greetings,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I found a solution to my case. Thank you all for help. Hope my code helps other with similiar cases.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Code:&lt;/P&gt;
&lt;PRE&gt;Dim oDrawingView As DrawingView

For Each oDrawingView In ThisApplication.ActiveDocument.ActiveSheet.DrawingViews
	
	'Check if a view has a parent, if not, do this.
	If oDrawingView.ParentView() Is Nothing Then
		
		If oDrawingView.Camera.ViewOrientationType = 10762 Or _ 'Bottom Left ISO view
			oDrawingView.Camera.ViewOrientationType = 10761 Or _ 'Bottom Right ISO view
			oDrawingView.Camera.ViewOrientationType = 10760 Or _ 'Top Left ISO view
			oDrawingView.Camera.ViewOrientationType = 10759 Then 'Top Right ISO view

			oDrawingView.Name = "ISO VIEW"
		   
		Else
			oDrawingView.Name = "Top parent view"
		End If
		
		oDrawingView.ShowLabel = True

	Else
		'oDrawingView.ShowLabel = True
		'oDrawingView.Name = "Not top parent view"
	End If
	
Next&lt;/PRE&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;ReneR&lt;/P&gt;</description>
      <pubDate>Thu, 31 Jan 2019 08:42:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/bug-when-searching-for-drawing-standard-type-views/m-p/8563179#M197504</guid>
      <dc:creator>ReneRepina</dc:creator>
      <dc:date>2019-01-31T08:42:51Z</dc:date>
    </item>
    <item>
      <title>Re: Bug when searching for drawing standard type views</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/bug-when-searching-for-drawing-standard-type-views/m-p/8564193#M197505</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5053305"&gt;@ReneRepina&lt;/a&gt;&amp;nbsp;, note that you don't have to use those numbers in the rule. If you add this line at the top of the rule:&lt;/P&gt;
&lt;PRE&gt;Imports Inventor.ViewOrientationTypeEnum&lt;/PRE&gt;
&lt;P&gt;Then iLogic will recognize the descriptive names&amp;nbsp;kIsoTopRightViewOrientation, kIsoTopLeftViewOrientation, etc. in the code. You can use them in place of the numbers.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Jan 2019 15:40:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/bug-when-searching-for-drawing-standard-type-views/m-p/8564193#M197505</guid>
      <dc:creator>MjDeck</dc:creator>
      <dc:date>2019-01-31T15:40:24Z</dc:date>
    </item>
    <item>
      <title>Re: Bug when searching for drawing standard type views</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/bug-when-searching-for-drawing-standard-type-views/m-p/8564234#M197506</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/537534"&gt;@MjDeck&lt;/a&gt; Thank you for additional help. I know I can use this instead of numbers (in this code I used like that because I found these syntaxes).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I found one problem though. The ISO views in my code are defined by 4 sides and it works ok, but if I turn view for 180° (so I see the backside), it does not flag him as TopRight or TopLeft or BottomRight or BottomLeft. I will try to came up with something and see what happens.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Jan 2019 15:52:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/bug-when-searching-for-drawing-standard-type-views/m-p/8564234#M197506</guid>
      <dc:creator>ReneRepina</dc:creator>
      <dc:date>2019-01-31T15:52:54Z</dc:date>
    </item>
    <item>
      <title>Re: Bug when searching for drawing standard type views</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/bug-when-searching-for-drawing-standard-type-views/m-p/8564250#M197507</link>
      <description>&lt;P&gt;Maybe&amp;nbsp;kArbitraryViewOrientation would work for that case.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Jan 2019 15:57:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/bug-when-searching-for-drawing-standard-type-views/m-p/8564250#M197507</guid>
      <dc:creator>MjDeck</dc:creator>
      <dc:date>2019-01-31T15:57:06Z</dc:date>
    </item>
    <item>
      <title>Re: Bug when searching for drawing standard type views</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/bug-when-searching-for-drawing-standard-type-views/m-p/8573238#M197508</link>
      <description>&lt;P&gt;I tried kArbitraryViewOrientation view. It works for other ISO views, but the new problem I am having currently using this, is that, if I for example put Base view in (as default like Inventors adds it), it works ok, but when I turn this base view for 90° (or anything else, even on others sides) it will flag it as kArbitraryViewOrientation and my code won't work as good as it should.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This code works for every manipulated view, but does not flag only iso views.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Dim oDrawingView As DrawingView

For Each oDrawingView In ThisApplication.ActiveDocument.ActiveSheet.DrawingViews
	
	'Check if a view has a parent, if not, do this.
	If oDrawingView.ParentView() Is Nothing Then
	
		'Check if view is an ArbitratyView
		If oDrawingView.Camera.ViewOrientationType = ViewOrientationTypeEnum.kArbitraryViewOrientation Then
			oDrawingView.Name = "Arbitraty VIEW"   
		Else
			oDrawingView.Name = "Top parent view"
		End If
		
		oDrawingView.ShowLabel = True

	Else
		'Code for non-top parent
	End If

Next&lt;/PRE&gt;</description>
      <pubDate>Tue, 05 Feb 2019 07:08:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/bug-when-searching-for-drawing-standard-type-views/m-p/8573238#M197508</guid>
      <dc:creator>ReneRepina</dc:creator>
      <dc:date>2019-02-05T07:08:39Z</dc:date>
    </item>
    <item>
      <title>Re: Bug when searching for drawing standard type views</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/bug-when-searching-for-drawing-standard-type-views/m-p/8574537#M197509</link>
      <description>&lt;P&gt;You can look at the numbers in the view projection matrix. It requires some code, but it might be the only way. &lt;BR /&gt;If the view is aligned to the model axes, then all the axis vectors in the matrix should have these properties:&lt;BR /&gt;- only one of the values is not 0&lt;BR /&gt;- the non-zero value is either 1 or -1&lt;BR /&gt;A matrix is available from the DrawingView.ModelToSheetTransform. Its axis vectors are multiplied by the view scale. So instead of testing for an absolute value of one, you would be looking for an absolute value of the view scale. (Another option would be to divide all numbers by the view scale.)&lt;BR /&gt;The matrix is 4x4, but you just want the 3x3 part of it that holds the axis vectors. That would be cells 0 to 2, 4 to 6, and 8 to 10.&lt;/P&gt;
&lt;P&gt;Because of round-off error, you can't compare for exact equality to zero or the view scale. You have to allow a small tolerance.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Feb 2019 16:29:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/bug-when-searching-for-drawing-standard-type-views/m-p/8574537#M197509</guid>
      <dc:creator>MjDeck</dc:creator>
      <dc:date>2019-02-05T16:29:15Z</dc:date>
    </item>
    <item>
      <title>Re: Bug when searching for drawing standard type views</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/bug-when-searching-for-drawing-standard-type-views/m-p/12721969#M197510</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/537534"&gt;@MjDeck&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After a really long time (5&amp;nbsp; years lol), I have manage to come to this reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the suggestion. A good idea to check the matrix values. As time passed by, we went with the original solution we had and it is working 99,9% of the time and for the error cases, it is users fault for not placing the view in the right way.&lt;/P&gt;</description>
      <pubDate>Sat, 20 Apr 2024 11:42:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/bug-when-searching-for-drawing-standard-type-views/m-p/12721969#M197510</guid>
      <dc:creator>ReneRepina</dc:creator>
      <dc:date>2024-04-20T11:42:56Z</dc:date>
    </item>
  </channel>
</rss>

