Is there a way to change a hole tag letter/number in a hole table. I would like to change the hole tagged as A1 to A2 but still keep the link to the hole location in the table.
I believe you can drag the hole downwards in the table and that should change the Tag.
I thought that was the case too. But apparently in '10 you can't do that any more.
I do not beleive there was ever this functionality with hole tables in SolidWorks.
You can drag the row, but the tags do not change. At least thats the way it works in SW2008.
I was mistaking, I've done it with BOMs, but not with a hole table. I'm not sure if they are set up different or not. So it looks like I'm going to have to find another soultion to this problem. What is the determining factor for how a hole table assigns numbers to holes?
The algorithm starts at the lower left, then goes up and to the right. I attached one of my details that I think pretty clearly shows how the hole wizard tags holes.
Use this code in a macro
' (1) Drawing document is open that contains
' a hole table named Hole Table1.
' (2) Hole Table1 has 4 columns (TAG, X LOC, Y LOC, and SIZE)
' and at least 5 rows.
' (1) Updating hole table tags is disabled.
' (2) Tag in column 1, row 2 is changed to Test1.
' (3) Tag in column 1, row 5 is changed to Test2.
' (4) Hole table and model view updated to show new tags.
Dim swApp As SldWorks.SldWorks
Dim swModel As SldWorks.ModelDoc2
Dim swSelMgr As SldWorks.SelectionMgr
Dim swHoleTable As SldWorks.HoleTable
Dim boolstatus As Boolean Dim Row As Integer Dim Tag As Variant Dim again As Boolean Set swApp = Application.SldWorks
Set swModel = swApp.ActiveDoc
Set swSelMgr = swModel.SelectionManager
boolstatus = swModel.Extension.SelectByID2("Hole Table1", "HOLETABLE", 0, 0, 0, False, 0, Nothing, 0)
Set swHoleTable = swSelMgr.GetSelectedObject6(1, -1)
swHoleTable.EnableUpdate = False ' Don't update hole table or model view swHoleTable.CombineTags = False swHoleTable.CombineSameSize = True again = True Do While again = True If MsgBox("Change Tag?", vbYesNo) = vbYes Then Row = InputBox("Row of Tag to change?") - 1 Tag = InputBox("New Tag name?") swHoleTable.HoleTag([Row]) = [Tag] swHoleTable.EnableUpdate = True swHoleTable.EnableUpdate = False Else again = False End If Loop End Sub
this is just a variation of the predefined macro to change tags. unfortunatly it will only work and stick for tables where the tags are uncombined.
the precondition is a table with four columns and the table must be named "Hole Table1"
Great macro! Thanks a lot; this saved the day.
Almost 10 years later and they didn't improved the hole table.
Thanks Matthew Drapp the macro works perfect.
Please review SW2019 What's New.
2019 What's New in SOLIDWORKS - Hole Table Tags - Prefixes, Numbers, and Order
You can click the row and drag to a desire location. With the grouped items in the desired order, ungroup them under table properties (uncheck combine same tags). Now select the first row header in the group and shift click the last row header (selecting all rows in the group you want to update). Right click, click renumber series. This should update the selected group to the desired designator (top of the list would be "A", etc). Now regroup by checking combine same tags under table properties. A bit kluged but it did what I was after.
In hole tables, you can create custom tag prefixes, edit tag numbers, and use several methods for defining the tag order.
You can define multiple custom tag prefixes. In hole tables, you can apply the prefixes to holes you select.
To define custom tag prefixes:
To apply custom tag prefixes:
You can directly edit the tag number for any hole in a hole table.
Double-click in the tag cell in the hole table or double-click the hole label annotation in the drawing view.
When you create a new hole table, you can specify the method for defining the order in which the holes are tagged.
Previously, only the XY method was available.
In the Hole Table PropertyManager, under Tag Order, select a method:
Please show me how to make table like this without macro:
prefix and suffix wont work, you cant combine numbers with letters or special characters.
If would be perfect if SW allow user to just double click the tag name and put any name we wish.
Simple and Fast but seems to be to hard to do it.
Retrieving data ...