Hello
When I add a block containing surface states or geometric tolerance, if I add it with the API the block says "Link broken", while if I add it manually it works.
This is particularly blocking.
Do you have this problem too or do you know how to fix it?
Example macro for you to test:
Dim swApp As SldWorks.SldWorks
Dim Part As SldWorks.ModelDoc2
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long
Sub main()
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
Dim myBlockDefinition As Object
Set myBlockDefinition = Part.SketchManager.MakeSketchBlockFromFile(Nothing, "CHEMIN_VERS_LE_BLOCK", False, 1, 0)
End Sub
In attached file a block to test.
In pictures:
Thank you.
bloc_tolerance_trous_fil.sldblk