Insert General Table in Part Example (VB.NET)
This example shows how to insert a general table annotation into a model
document.
'--------------------------------------------------------------------------
' Preconditions: Open a part.
'
' Postconditions: The model document contains the specified general table.
'--------------------------------------------------------------------------
Imports
SolidWorks.Interop.sldworks
Imports
SolidWorks.Interop.swconst
Imports
System.Runtime.InteropServices
Imports
System
Partial
Class
SolidWorksMacro
Dim
Part As
ModelDoc2
Dim
modelDocExt As
ModelDocExtension
Dim
myTable As
TableAnnotation
Sub
main()
Part = swApp.ActiveDoc
modelDocExt = Part.Extension
myTable = modelDocExt.InsertGeneralTableAnnotation(True,
0, 0, swBOMConfigurationAnchorType_e.swBOMConfigurationAnchor_TopLeft,
"", 2, 2)
End
Sub
Public
swApp As
SldWorks
End
Class