AnsweredAssumed Answered

Compare ModelView

Question asked by Mahir Abrahim on Jun 15, 2018
Latest reply on Jun 20, 2018 by Mahir Abrahim

How can I detect whether two model views are different. Case in point, I'd like to check if a Normal To view operation changed the view orientation, or if the view was already normal. Below is an example.


Dim swApp As SldWorks.SldWorks

Dim swDoc As SldWorks.ModelDoc2

Dim StartView As SldWorks.ModelView

Dim CurView As SldWorks.ModelView

Set swApp = Application.SldWorks

Set swDoc = swApp.ActiveDoc


Set StartView = swDoc.ActiveView

swDoc.ShowNamedView2 "*Normal To", -1

Set CurView = swDoc.ActiveView


Debug.Print CurView Is StartView