Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

do action in invenotr whill running code , is that possible

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
Darkforce_the_ilogic_guy
168 Views, 2 Replies

do action in invenotr whill running code , is that possible

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

 

2 REPLIES 2
Message 2 of 3

Hi @Darkforce_the_ilogic_guy 

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

Message 3 of 3

Thanks.. it seens to work 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report