Hi,
I've done it for a detail view, be aware that i created this in VB.NET and i'm not sure it will work in vba or ilogic.
Also i've noticed that sometimes, depending on which view and how it's placed, buttons on the detailview form where altered by Inventor (for example, shaded view, not shaded)
It's the only way i could do this , not very neat.
Private Sub CustomDetailView_OnExecute(Context As NameValueMap) Handles CustomDetailView.OnExecute
Try
Dim oDrawDoc As DrawingDocument = InvApp.ActiveDocument
Dim oDrawingView As DrawingView
If oDrawDoc.ActiveSheet.DrawingViews.Count > 1 Then
oDrawingView = InvApp.CommandManager.Pick(SelectionFilterEnum.kDrawingViewFilter, "Select view.")
Else
oDrawingView = oDrawDoc.ActiveSheet.DrawingViews.Item(1)
End If
oDrawDoc.SelectSet.Select(oDrawingView)
Dim oCommandMgr As CommandManager = InvApp.CommandManager
Dim oControlDef As ControlDefinition = oCommandMgr.ControlDefinitions("DrawingDetailViewCmd")
Call oControlDef.Execute()
SendKeys.SendWait("{TAB}")
SendKeys.SendWait(My.Settings.ActualScale)
SendKeys.SendWait("+{TAB}")
SendKeys.SendWait("+{TAB}")
SendKeys.SendWait("+{TAB}")
SendKeys.SendWait("+{TAB}")
SendKeys.SendWait("+{TAB}")
SendKeys.SendWait("{RIGHT}")
Catch ex As Exception
MsgBox(Err.Description & " " & Err.Number)
End Try
End Sub
For ages the community is asking for a way to define every inputbox setting...
If you think this answer fullfilled your needs, improved your knowledge or leads to a solution,
please feel free to "kudos"