您好jntm226';s函数具有充分的说明性,您可以通过不同的方式使用它们来履行职责
无论如何,我可以为你做这件事,但不是今天和明天。也许我有机会在周五或周六做这件事
不过,我会给你两个指南和链接,希望你能自己回答
如果你失败了,我会为你写的
首先转到此链接:https://forums.autodesk.com/t5/inventor-customization/sheet-number-in-vba/td-p/2360887请注意以下为Autodesk Inventor和相关文章编写的功能(这有助于了解工作的思路和基础)
- 'The sheet number is appended to the sheet name in the browser. You can get this name using the Name property of the Sheet
- 'object and then extract the number from the name. Here's an example of a 'function that does this.
- Codes by :Brian Ekins
-
- Public Function GetSheetNumber(ByVal Sheet As Inventor.Sheet) As Integer
- Dim strSheetName As String
- strSheetName = Sheet.Name
-
- If InStr(strSheetName, ":") Then ' Extract the sheet number from the name.
- GetSheetNumber = CInt(Right$(strSheetName, Len(strSheetName) - InStrRev(strSheetName, ":")))
- Else
- GetSheetNumber = 0 ' This sheet is not numbered so return zero.
- End If
- End Function
第二步转到此链接:https://www.cadtutor.net/forum/topic/6051-sheetset-vba-index/注意;ML0940第144号帖子“;以及相关职位
成功,玩得开心。 |