Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Open Drawing Revision Table Editor Window with iLogic?

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
Matthew_Policelli
214 Views, 3 Replies

Open Drawing Revision Table Editor Window with iLogic?

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!

3 REPLIES 3
Message 2 of 4

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
Message 3 of 4
jjstr8
in reply to: Matthew_Policelli

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

 

Message 4 of 4
Matthew_Policelli
in reply to: jjstr8

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!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Customer Advisory Groups


Autodesk Design & Make Report