iCAx开思网
标题:
图页名称更改为模型名称
[打印本页]
作者:
板上沙丁鱼
时间:
2015-12-9 10:32
标题:
图页名称更改为模型名称
本帖最后由 板上沙丁鱼 于 2015-12-9 11:02 编辑
自己借鉴做的很粗糙
Sub main()
Set swApp = Application.SldWorks
Set swdraw = swApp.ActiveDoc
Set view = swdraw.GetFirstView
Set view = view.GetNextView
modelpath = view.GetReferencedModelName
Debug.Print modelpath
splittedpathname = Split(modelpath, "")
sfilename = splittedpathname(UBound(splittedpathname))
sfilename = Left(sfilename, Len(sfilename) - 7)
Set sheet = swdraw.GetCurrentSheet
sheet.SetName sfilename
End Sub
复制代码
作者:
wutong490
时间:
2015-12-18 21:44
有闷大的宏可以学习
https://www.icax.org/forum.php?m ... &fromuid=706806
欢迎光临 iCAx开思网 (https://www.icax.org/)
Powered by Discuz! X3.3