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: 

how to open custom properties window using vba

6 REPLIES 6
SOLVED
Reply
Message 1 of 7
akosi
723 Views, 6 Replies

how to open custom properties window using vba

how to open custom properties window using vba

 

 

6 REPLIES 6
Message 2 of 7
Gruff
in reply to: akosi

I do not think there is an API to open the properties window.

However you can create your own dialog and populate it using API properties functions.

Basically create your own properties window.
Message 3 of 7
akosi
in reply to: Gruff

good idea...thanks!!Smiley Happy

Message 4 of 7
ekinsb
in reply to: akosi

It is possible to execute the iProperties command from the API.  The following VBA code will do it.  However, it's not possible to set it to the Custom tab once the dialog is displayed.

 

Public Sub StartiPropertiesCommand()
    Dim controlDefs As ControlDefinitions
    Set controlDefs = ThisApplication.CommandManager.ControlDefinitions
    Select Case ThisApplication.ActiveDocument.DocumentType
        Case kAssemblyDocumentObject
            controlDefs.Item("AssemblyiPropertiesCmd").Execute
        Case kPartDocumentObject
            controlDefs.Item("PartiPropertiesCmd").Execute
        Case kDrawingDocumentObject
            controlDefs.Item("DrawingiPropertiesCmd").Execute
        Case kPresentationDocumentObject
            controlDefs.Item("PresentationiPropertiesCmd").Execute
    End Select
End Sub

 

To learn more about directly running Inventor commands see:

 

http://modthemachine.typepad.com/my_weblog/2009/03/running-commands-using-the-api.html


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog
Message 5 of 7
akosi
in reply to: ekinsb

this is great ekinsb!!!!Smiley LOL

 

can i choose the particular tab show? like for example : the custom tab...is it possible?

Message 6 of 7
ekinsb
in reply to: akosi

This just executes the command, the same as if you run the command in the UI.  It's not possible to set the tab through the API.  It might be possible using the Windows API, but that wouldn't be simple.


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog
Message 7 of 7
akosi
in reply to: ekinsb

thanks a lot anyway.....

 

this is still a big help   Smiley LOL

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

Post to forums