When running this ilogic code.. I need to have a break ...to click the copy link in inventor without stopping it form making the shareview... Like it do If i use While loop or stop my form clicking the link if I use a message box... to stop the code
maybe a way to maybe like sat the ShowModal = false for inventor message box or some other way.
Imports System.Windows.Forms
Sub Main()
Dim oDoc = ThisApplication
Dim cam As Camera = oDoc.ActiveView.Camera
'Set new home to Front
cam.ViewOrientationType = ViewOrientationTypeEnum.kIsoTopRightViewOrientation
cam.ApplyWithoutTransition 'Apply Front View
Dim oCommandMgr As CommandManager = oDoc.CommandManager
Dim oControlDef As ControlDefinition = oCommandMgr.ControlDefinitions.Item("cmdCreateViewShare")
'Generate shared view
oControlDef.Execute2(False)
SendKeys.SendWait("{TAB 4}{ENTER}")
MessageBox.Show("Genereating Shared view. Hit OK When finnish", "Shared view")
Clipboard.Clear
'wait here.. whill I click the copy link in inventor
Dim SharedViewLink As String
SharedViewLink = Clipboard.GetText
InputBox("URL", "Shared view link", SharedViewLink)
End Sub
Solved! Go to Solution.
Solved by JhoelForshav. Go to Solution.
Try this 🙂
Imports System.Windows.Forms
Sub Main()
Dim oDoc = ThisApplication
Dim cam As Camera = oDoc.ActiveView.Camera
'Set new home to Front
cam.ViewOrientationType = ViewOrientationTypeEnum.kIsoTopRightViewOrientation
cam.ApplyWithoutTransition 'Apply Front View
Dim oCommandMgr As CommandManager = oDoc.CommandManager
Dim oControlDef As ControlDefinition = oCommandMgr.ControlDefinitions.Item("cmdCreateViewShare")
'Generate shared view
oControlDef.Execute2(False)
SendKeys.SendWait("{TAB 4}{ENTER}")
MessageBox.Show("Genereating Shared view. Hit OK When finnish", "Shared view")
Clipboard.Clear
'wait here.. whill I click the copy link in inventor
While Clipboard.ContainsText = False
ThisApplication.UserInterfaceManager.DoEvents
End While
Dim SharedViewLink As String
SharedViewLink = Clipboard.GetText
InputBox("URL", "Shared view link", SharedViewLink)
End Sub
Jhoel Forshav
Download my free Inventor Addin - Hole Projector
LinkedIn | Ideas | Contributions | Blog posts | Website