Inventor二次开发入门(3)
发布时间:2021-06-06
发布时间:2021-06-06
4. Add the code:
In the code window, type the code below into the Sub Button1_Click. (This is what runs when the button is clicked.) You may need to scroll down towards the
bottom of the code to find the place to add the below code, looking for the words ‘Add code for Lesson 1 here’.To get the full experience of developing with Visual Basic Express – including the use of features such as IntelliSense – we recommend you type the code from this guide rather than copying and pasting it.
That said, if constrained for time you can also copy and paste into the Visual Basic Express code window, although this will reduce the experience you gain from working with the code directly.
If _invApp.Documents.Count = 0 Then
MsgBox("Need to open an Assembly document")
Return
End If
If _invApp.ActiveDocument.DocumentType <> _
DocumentTypeEnum.kAssemblyDocumentObject Then
MsgBox("Need to have an Assembly document active")
Return
上一篇:雅思口语练习经典素材集锦
下一篇:肾脏移植患者用药的护理管理