Hello
I would like to be able to integrate in my configuration selection macro the fact of checking the option "Link the balloon text to the specified table"
Can you tell me the order in VBA please?
Thank you
capture-coche.jpg
Hello
I would like to be able to integrate in my configuration selection macro the fact of checking the option "Link the balloon text to the specified table"
Can you tell me the order in VBA please?
Thank you
Hello. The command is SetKeepLinkedToBOM
Example:
Option Explicit
Sub main()
Dim swApp As SldWorks.SldWorks
Dim swBOMtbl As SldWorks.BomFeature
Dim swView As SldWorks.View
Dim swModel As SldWorks.ModelDoc2
Dim swSelMgr As SldWorks.SelectionMgr
Set swApp = Application.SldWorks
Set swModel = swApp.ActiveDoc
Set swSelMgr = swModel.SelectionManager
Dim i As Long
For i = 1 To swSelMgr.GetSelectedObjectCount2(-1)
If swSelMgr.GetSelectedObjectType3(i, -1) = swSelDRAWINGVIEWS Then
Set swView = swSelMgr.GetSelectedObject6(i, -1)
ElseIf swSelMgr.GetSelectedObjectType3(i, -1) = swSelBOMFEATURES Then
Set swBOMtbl = swSelMgr.GetSelectedObject6(i, -1)
End If
Next i
If swView Is Nothing Or swBOMtbl Is Nothing Then
MsgBox "Sélectionner une vue et une table dans l'arbre"
Exit Sub
End If
MsgBox "Lier la vue: " & swView.Name & vbCr & "à la table: " & swBOMtbl.Name & vbCr & swView.SetKeepLinkedToBOM(True, swBOMtbl.Name)
End Sub
Thank you for your answer,
I'll test that as soon as possible.