Hi @Lukasz.Dudkowski
Here is an iLogic example that might work for you.
You can modify the list to use any colors you want, I just added the ones listed for testing... just give the color a name and RGB values.
I'd make this an external rule, so you can have a single rule to use in all drawings.
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com
'add any color you want here,
'using the format oList.Add("Color Name | R,G,B")
'see this link for some named colors:
'https://www.color-name.com/color/trending
Dim oList As New ArrayList
oList.Add("Red | 255,0,0")
oList.Add("Green | 0,255,0")
oList.Add("Yellow | 255,255,0")
oList.Add("Cyan | 0,255,255")
oList.Add("Magenta | 255,0,255")
oList.Add("White | 255,255,255")
oList.Add("Black | 0,0,0")
oList.Add("Gray | 155,155,155")
oList.Add("Periwinkle | 204,204,255")
oList.Add("Orange | 255,121,0")
oList.Add("Brown | 177,144,127")
oColor = InputListBox("Select one", oList, "", "ilogic", "List")
'split the name and RGB using the |
sSPlit = Split(oColor, "|")
sColorName = Trim(sSPlit(0))
sColorValues = Trim(sSPlit(1))
'split the Red, Green, Blue values using the comma
sSPlit = Split(sColorValues, ",")
sR = sSPlit(0)
sG = sSPlit(1)
sB = sSPlit(2)
'create the color
oColor = ThisApplication.TransientObjects.CreateColor(sR, sG, sB)
While True
'select the line segments
Dim oSegment As DrawingCurveSegment
oSegment = ThisApplication.CommandManager.Pick _
(SelectionFilterEnum.kDrawingCurveSegmentFilter, _
"Select edges to make " & sColorName & " (press ESC to exit selection)")
If IsNothing(oSegment) Then Exit While
'set the segment color
oSegment.Parent.Color = oColor
End While
