Sheet Metal Template what style

Sheet Metal Template what style

Anonymous
Not applicable
477 Views
2 Replies
Message 1 of 3

Sheet Metal Template what style

Anonymous
Not applicable

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.

0 Likes
478 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable

 

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

0 Likes
Message 3 of 3

philippe.leefsma
Alumni
Alumni

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

0 Likes