余存 发表于 2015-12-31 16:30 static/image/common/back.gif
额。。。看不懂啊,大侠,这是啥?
新建一个宏。
运行
steve_suich 发表于 2015-12-31 16:00
您好!
这个我试着输入过但是不行,您能否发个SWP格式的来呢?
万分感谢!!
steve_suich 发表于 2015-12-31 16:02
看着这回复,总觉得自己要学的很多
l楼主可以把修改好的标题栏(可以做链接)的图纸保存好图纸格式,A4-A1分别做一个,然后打开你要修改的图纸,右键属性,选择相应大小的图纸格式替换掉就ok了 至于模板是改不了的,你可以在选项里设置好你的样式,然后保存好绘图标准,打开每张图纸加载该样式就可以了,反正每张图纸你都要检查修改公差等,顺便更改一下图纸格式和加载绘图标准,就相当于换了模板和格式了 我们之前有一款插件可以实现批量替换图纸模板,肯定有这方面的工具,你可以问一下度娘:SolidWorks批量替换工程图图框,保证有收获。
d:\Users\Administrator\Desktop\捕获1.PNG到这里了下步怎么弄 Dim swApp As Object
Dim Part As Object
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long
Dim path As String
Dim fname As String
Dim m As Integer
Dim shname() As String
Sub Main()
Set swApp = _
Application.SldWorks
path = InputBox("D:\Program Files\SOLIDWORKS Corp\SOLIDWORKS\lang\chinese-simplified\Tutorial", "批量替换图框")
fname = Dir(path & "*.slddew")
Do Until fname = ""
Set Part = swApp.OpenDoc(path + fname, 3)
Set Part = swApp.ActiveDoc
shname = Part.GetSheeetNameS()
For m = 0 To Part.GetSheeetCount - 1
If Part.ActivateSheet(shname(m)) Then
boolstatus = Part.SetupSheet5(shname(m), 8, 12, 0, 0, True, _
"C:\ProgramData\SOLIDWORKS\SOLIDWORKS 2020\lang\Chinese-Simplified\sheetformat\a3 - gb.slddrt", _
0.42, 0.297, "默认", True)
End If
Next
Part.Save
swApp.CloseDoc (Part.GetTitle)
Set Part = Nothing
fname = Dir
Loop
End Sub
页:
1
[2]