Inventor Crashes when creating a new idw with ilogic, only happens in vault project
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have created an idw template that runs some ilogic upon creating a new document. The ilogic brings up a message box to choose the part type, which changes the titleblock and starts a new base view. Upon clicking "ok" or "cancel" in the new drawing view dialog box Inventor crashes. This only occurs when in a Vault project. When in a non-Vault project it works flawlessly.
I created a copy that does not run the ilogic rule upon creating a new document, and run the rule manually and there is no problem.
I would really like to use this in our work flow. Any help would be greatly appreciated.
I have included a gif of the crash, the ilogic rule, and a copy of the template and a couple parts to test.
If iProperties.Value("Project", "Description") = "" Or iProperties.Value("Project", "Description") <> "" Then
Question = InputListBox("What type of part is this?", MultiValue.List("TITLE"), TITLE, Title := "Part Types", ListName := "List")
End If
If Question = "PLATE" Then
TITLE = "PLATE"
ElseIf Question = "LINEAR" Then
TITLE = "LINEAR"
ElseIf Question = "SHAFT" Then
TITLE = "SHAFT"
End If
Dim oDoc As DrawingDocument
oDoc = ThisApplication.ActiveDocument
Dim oSheet As Sheet
oSheet = oDoc.ActiveSheet
Dim oView As DrawingView
Dim oCommandMgr As CommandManager
oCommandMgr = ThisApplication.CommandManager
' Get control definition for the line command.
Dim oControlDef As ControlDefinition
oControlDef = oCommandMgr.ControlDefinitions.Item("DrawingBaseViewCmd")
oControlDef.Execute2(True)(Upon looking at the code I realize the second if/else statement is a bit redundant, but I'm pretty sure that's not causing the problem.)

