Suitable iLogic funtions for part template

Suitable iLogic funtions for part template

CAD-One
Collaborator Collaborator
579 Views
2 Replies
Message 1 of 3

Suitable iLogic funtions for part template

CAD-One
Collaborator
Collaborator

Guys,

 

I am working on creating a new part file Template. Anybody has or can think of a useful and productive iLogic functions those are already available.

 

A while ago, I had seen one that would simply triger when part was checked in or saved. It would check if the material feild was utilzed or forgotten at Default.

 

On those lines, please share if there are any good iLogic functions that we might benefit from.

 

Thanks

 

C1
Inventor Professional 2020
Vault Professional 2020
AutoCAD 2020
0 Likes
Accepted solutions (1)
580 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
Accepted solution

You can use the following to check if the Material is set to Default and display a message box if it is.

 

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

 

I also use similar code to check for Part Number, Description, etc.

 

-Shawn

Message 3 of 3

CAD-One
Collaborator
Collaborator

Thanks for responding & pointing to a good direction.

C1
Inventor Professional 2020
Vault Professional 2020
AutoCAD 2020
0 Likes