Message 1 of 3
Reg : Adding Sheets with Part Desciption
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Dear all,
My intension is to get a code which can ADD MULTIPLE sheets and correspondingly Prompts the user to enter the PART DESCRIPTION.
Here I have one macro which will give only a INPUT BOX for part Description. But, I dont know where i made wrong.
Its giving only Input Box and later it is not working.
Can anybody help me to make my work so faster and better.
Thanks in advance.
Public Sub AddSheets()
Dim oDoc As Inventor.Document
Set oDoc = ThisApplication.ActiveDocument
' Check the Document type is an assembly or part
If (oDoc.DocumentType <> kDrawingDocumentObject) Then
MsgBox "Error:Document type must be Drawing"
Set oDoc = Nothing
Exit Sub
End If
'Here we will put up a box to ask how many sheets to create
Dim counter, sheet_name, default
default = "PART - 1"
sheet_name = InputBox("Enter Part Description:", "Add Multiple Sheets with Part Description", default)
' user will get a type mismatch error if they enter letters instead of numbers
Call ThisApplication.CommandManager.StartCommand(kCreateNewSheetCommand)
End Sub
My intension is to get a code which can ADD MULTIPLE sheets and correspondingly Prompts the user to enter the PART DESCRIPTION.
Here I have one macro which will give only a INPUT BOX for part Description. But, I dont know where i made wrong.
Its giving only Input Box and later it is not working.
Can anybody help me to make my work so faster and better.
Thanks in advance.
Public Sub AddSheets()
Dim oDoc As Inventor.Document
Set oDoc = ThisApplication.ActiveDocument
' Check the Document type is an assembly or part
If (oDoc.DocumentType <> kDrawingDocumentObject) Then
MsgBox "Error:Document type must be Drawing"
Set oDoc = Nothing
Exit Sub
End If
'Here we will put up a box to ask how many sheets to create
Dim counter, sheet_name, default
default = "PART - 1"
sheet_name = InputBox("Enter Part Description:", "Add Multiple Sheets with Part Description", default)
' user will get a type mismatch error if they enter letters instead of numbers
Call ThisApplication.CommandManager.StartCommand(kCreateNewSheetCommand)
End Sub