Hello at all,
i am looking for a way to fire a button on a Folder Card which starts an add-in an get the values from an SQL-Database.
With the following code I can already get the command button but not execute it. Is there a way with vba to do this ??
Option Explicit
Dim vault As EdmVault5
Dim Folder As IEdmFolder5
Dim card As IEdmCard5
Dim card_control As IEdmCardControl6
Dim pos As IEdmPos5
Dim i As Integer
Dim button_fire As String
'Get Validation
Dim var_type As EdmVariableType
Dim min As Integer
Dim max As Integer
Sub main()
Set vault = CreateObject("ConisioLib.EdmVault.1")
vault.LoginAuto "KELLER-PDM", 0
Set Folder = vault.BrowseForFolder(0, "Wähle deinen Ordner")
Set card = Folder.GetCard(".")
Set pos = card.GetFirstControlPosition
Do While pos.IsNull = False
Set card_control = card.GetNextControl(pos)
If card_control.ControlType = EdmCardControlType.EdmCtrl_Button Then
button_fire = card_control.GetButtonCommand(1)
var_type = card_control.GetValidation(min, max)
End If
Loop
End Sub
SolidworksApi macros