Delete a Design Table from a Macro
Delete a Design Table from a Macro
(OP)
Hello,
How do I delete a Design Table from a part file within a macro? The recored code for this is listed below. This code will not work unless the DT is actually selected before running the macro. The boolean status line doesn't really select the DT. The real question then is "How do I select the DT so I can delete it?"
Thanks.
Dim swApp As Object
Dim Part As Object
Dim boolstatus As Boolean
Dim longstatus As Long
Dim Annotation As Object
Dim Gtol As Object
Dim DatumTag As Object
Dim FeatureData As Object
Dim Feature As Object
Dim Component As Object
Sub main()
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
boolstatus = Part.Extension.SelectByID("Design Table", "DESIGNTABLE", 0, 0, 0, False, 0, Nothing)
Part.EditDelete
End Sub
How do I delete a Design Table from a part file within a macro? The recored code for this is listed below. This code will not work unless the DT is actually selected before running the macro. The boolean status line doesn't really select the DT. The real question then is "How do I select the DT so I can delete it?"
Thanks.
Dim swApp As Object
Dim Part As Object
Dim boolstatus As Boolean
Dim longstatus As Long
Dim Annotation As Object
Dim Gtol As Object
Dim DatumTag As Object
Dim FeatureData As Object
Dim Feature As Object
Dim Component As Object
Sub main()
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
boolstatus = Part.Extension.SelectByID("Design Table", "DESIGNTABLE", 0, 0, 0, False, 0, Nothing)
Part.EditDelete
End Sub






RE: Delete a Design Table from a Macro
DesTableName = DesTable.GetTitle ( )
boolstatus = Part.Extension.SelectByID(Des TableName, "DESIGNTABLE", 0, 0, 0, False, 0, Nothing)
Part.EditDelete
An untried shot in the dark. Might get you started in the right direction.
RE: Delete a Design Table from a Macro
Thanks for the fast response. The code still doesn't select the DT though, so the macro just runs through and ends without deleting the DT. - Oorah
RE: Delete a Design Table from a Macro
Eventually I get an error "None of selected entities could be deleted."
RE: Delete a Design Table from a Macro
3/4 of all the Spam produced goes to Hawaii - shame that's not true of SPAM also.......
RE: Delete a Design Table from a Macro