Is there an iLogic that specifies the user color in the hole or tap feature?

Is there an iLogic that specifies the user color in the hole or tap feature?

larrykim
Explorer Explorer
435 Views
1 Reply
Message 1 of 2

Is there an iLogic that specifies the user color in the hole or tap feature?

larrykim
Explorer
Explorer

Is there an iLogic that specifies the user color in the hole or tap feature?
I want to distinguish by specifying colors when I work on tap or pin-hole in the part file.

0 Likes
436 Views
1 Reply
Reply (1)
Message 2 of 2

Alexander_Chernikov
Mentor
Mentor

Hi, try such rule:

MyDoc = ThisDoc.Document
Dim oDef As ComponentDefinition = MyDoc.ComponentDefinition
Dim oFeature As PartFeature
Dim oFeatures As PartFeatures = oDef.Features
Dim oHole As HoleFeature
Dim oHoles As HoleFeatures = oFeatures.HoleFeatures
Dim MyColor As String = "Smooth - Yellow"
For Each oHole In oHoles
  Feature.Color(oHole.Name) = MyColor
Next
InventorVb.DocumentUpdate()

Do you find the posts helpful? "LIKE" these posts! | Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням!
Have your question been answered successfully? Click "ACCEPT SOLUTION" button. | На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ"

Олександр Черніков / Alexander Chernikov

EESignature

Facebook | LinkedIn

.