The attached recorded macro inserts a particular part from the said folder. How do i modify the attached macro so that i can insert the only part in the folder? The folder normally has only 1 part and its drawing.
Dim swApp As Object
Dim Part As Object
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long
Sub main()
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
boolstatus = Part.Extension.SelectByID2("Front Plane", "PLANE", 0, 0, 0, False, 0, Nothing, 0)
Dim myFeature As Object
Set myFeature = Part.InsertPart2("C:\\FsmWork\\51813.SLDPRT", 273)
Part.ClearSelection2 True
Part.ShowNamedView2 "*Front", 1
End Sub
Thank you
SolidworksApi macros