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: 

Sheet Metal Template what style

2 REPLIES 2
Reply
Message 1 of 3
Ray_P
348 Views, 2 Replies

Sheet Metal Template what style

Is there a rule or code that runs when a new template is started - to prommpt me to select style from sheetmetal styles tab? It would keep me from tracking 20 or so templates. The styles are there in the library just want a rule to fire to prompt for material & thickness for new parts.

2 REPLIES 2
Message 2 of 3
Ray_P
in reply to: Ray_P

 

I have a the message box prompt but would like the "Sheet Metal Defaults" window and the drop down list to start when a new part is made. scereen shot

 

If ThisDoc.Document.ComponentDefinition.Material.Name = "Default" Then

i = MessageBox.Show("Please Select a Material Type" & vbNewLine & ThisDoc.PathAndFileName(True), "Title", MessageBoxButtons.OK, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1)

End If

Message 3 of 3
philippe.leefsma
in reply to: Ray_P

Hi Ray,

 

You can display programmatically this dialog using the code below. However there is no direct way to display the drop-down list. In order to achieve this you would need for example to rely on a low level approach using the Win32 API. This is teoretically doable, but it might get a bit tricky to achieve.

 

I hope it helps.

 

Public Sub ExecuteCommand()
  
    ThisApplication.CommandManager.ControlDefinitions.item("SheetMetalStylesCmd").Execute
    
End Sub

 

Regards,

Philippe.



Philippe Leefsma
Developer Technical Services
Autodesk Developer Network

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

Post to forums  

Autodesk Design & Make Report