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.
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
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.