Open Drawing Revision Table Editor Window with iLogic?

Matthew_Policelli
Advocate
Advocate

Open Drawing Revision Table Editor Window with iLogic?

Matthew_Policelli
Advocate
Advocate

Matthew_Policelli_0-1642093072434.png

Is there a way to get this window to open via iLogic? 

 

I tried using the code here, and modifying the command line (I tried DrawingRevisionTableCmd and that just gives the dialog for adding a new rev table).

 

The reason I want this is that I created an ilogic that deletes and re-creates the table (to get rid of revision tags and also fix the occasional rev letter out of sync that seems to happen sometimes), and then re-inserts and re-fills it on all sheets, and then asks if the user wants to up the revision letter. If they say yes, it deletes the last rev on the table (we keep up to 3 at a time), and adds a new revision. However, I want it to also open the above dialog so that the user can fill out the revision table for the new revision without having to open manually.

 

If anyone could provide help with this (or dash my hopes by telling me it is impossible), I would really appreciate it!

0 Likes
Reply
Accepted solutions (2)
301 Views
3 Replies
Replies (3)

A.Acheson
Mentor
Mentor
Accepted solution

Here is the command and I found it at this helpful post here. A word of caution without a revision list selected either in the drawing or the browser Node Inventor went into a loop and then crashed. 

 

 

Dim oCDs As ControlDefinitions
 oCDs = ThisApplication.CommandManager.ControlDefinitions
  MessageBox.Show("Message", "Title")

Dim oCD As ControlDefinition
oCD = oCDs("DrawingRevisionTableEditCtxCmd")
 oCD.Execute

 Instead of using commands you could just code all your changes in ilogic and add the info through input boxes. It sounds like your partially there any how. Add the revision row and place the info directly to the cell. Then you can make use of standard comments in a list box and this will drive consistency. The dialogue that is with Inventor seems oddly small and frustrating to use. 

 

AAcheson_0-1642098486589.png

AAcheson_1-1642098525180.png

 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
0 Likes

jjstr8
Collaborator
Collaborator
Accepted solution

I think this does what you're asking.

Dim cmdManager As CommandManager = ThisApplication.CommandManager
Dim ctrlDef As ControlDefinition = cmdManager.ControlDefinitions.Item("DrawingRevisionTableEditCtxCmd")
Dim activeDoc As Document = ThisApplication.ActiveDocument

If activeDoc.DocumentType <> DocumentTypeEnum.kDrawingDocumentObject Then
	MessageBox.Show("Not a drawing!")
	Return
End If
Dim drwSheet As Sheet = activeDoc.ActiveSheet
If drwSheet.RevisionTables.Count = 0 Then
	MessageBox.Show("No revision tables!")
	Return
End If
activeDoc.SelectSet.Clear
activeDoc.SelectSet.Select(drwSheet.RevisionTables(1))
ctrlDef.Execute

 

Matthew_Policelli
Advocate
Advocate

I see what I was doing incorrectly now. I had tried using DrawingRevisionTableEditCtxCmd but it kept crashing Inventor. That's because I wasn't selecting the rev table before executing. Thank you!

0 Likes