I don't know of any existing tools to do this but it is surely possible via a program that should automatically from a list of plans:
- Open the SLDDRW plan.
- Analyze all the notes in this plan.
- Modify the grade if = xxxxxxx.
- Save this plan.
- Move on to the next plan.
-etc...
Attached is a small example of a program, to be launched after starting SW and loading an SLDDRW plan. This program allows you to search for all the notes and all the dimensions present on a plane (not all tolerances though).
Too bad we can't scroll some info was inaccessible at the bottom of the result window
We can't select the text
But especially for my application I would have to open all the plans (200) one by one. You might as well do it by hand with SW / tools / Search/modify.
I would have liked something more automatic, but I don't think it exists.
Dim swApp As Object
Dim Part As Object
Dim longstatus As Long
Sub main()
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
'--------------------Find and Replace Annotations--------------------
Set swUtil = swApp.GetAddInObject("Utilities.UtilitiesApp")
Set swUtilFindReplaceAnnotations = swUtil.FindReplaceAnnotations
longstatus = swUtilFindReplaceAnnotations.InitPMPage()
'--------------------Block Recording--------------------
#If 0 Then
#End If
'--------------------UnBlock Recording------------------
swUtilFindReplaceAnnotations.FindText = "M6x30"
swUtilFindReplaceAnnotations.ReplaceText = "M6x30 - 8.8"
swUtilFindReplaceAnnotations.options = gtFraMatchCase Or gtFraWholeWord Or gtFraIncludeHiddenAnnotation
swUtilFindReplaceAnnotations.AnnotationFilter = gtFraAllTypes
Part.ClearSelection2 True
longstatus = swUtilFindReplaceAnnotations.ReplaceAll()
'--------------------Block Recording--------------------
#If 0 Then
#End If
'--------------------UnBlock Recording------------------
longstatus = swUtilFindReplaceAnnotations.Close()
End Sub
to see to put it in a program that loops on all the planes of a folder on the other hand I am bothered by the dialog box that appears at the end of the macro :/
This program is just an example to search for the notes and dimensions of a shot, you have to automate the opening and closing of SLDDRWs, modify notes or dimensions automatically, trace the result in a log file, etc ....
Your need requires a bit of programming knowledge (vba, vb.net or C#) but is doable. To process 200 plans, this will represent a processing time of about 20 to 30 minutes in the end, but before that, it takes about 2 hours to write the program.
Thank you for your feedback, and your involvement!
I'll look according to my meagre programming skills and my availability.
I'm more familiar with VB because I've done a lot of macro for Excel, for C++ I saw it at school in the 2000s, so I'm not up to date at all but it offers other possibilities.
- Loading a CSV file containing the list of files to be analyzed, please note that this list must be formatted like the file liste.csv attached with the program.
- Open each file in Solidworks.
- Analyze all notes in each 2D file loaded.
- Replace the "Text to be modified" with the "New note text"
- Save the modified plan.
It is best to test on a small amount of 2D file copy to get started.
At the end of the processing, a résultat.csv file will be created in the executable folder indicating whether the files have been processed or misplaced.
As indicated when launching the program, it is imperative to make a backup of all the files to be processed before processing.
I don't like to create a backup function of SolidWorks files for other people because as an external person I feel that I don't have to intervene on them in modification mode but for the operation of this program I was a bit obliged to do so, so please work on copies of the files and not on the originals.