05-20-2019
09:30 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
05-20-2019
09:30 AM
The second snippet of code is a procedure. Whenever you use functions or procedures in iLogic, a primary procedure must be created called Main. Any code you would normally place directly into the rule would be placed inside the Main procedure. Replace the first snippet of code with below.
Also, make sure you replace "R14400" with the name of the part you want to change color.
Sub Main() Dim asmDoc As AssemblyDocument asmDoc = ThisApplication.ActiveDocument ' set color for the standard screws Call SetColor(asmDoc.ComponentDefinition.Occurrences,"R14400","Zinc")SyntaxEditor Code Snippet End Sub