Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
JelteDeJong
in reply to: neodd70

The problem here is that you try to change the color but by default a sketch does not have a color. therfor you need to give it a color. for example this will make your first skecth in your part red.

Dim doc As PartDocument = ThisDoc.Document
Dim red As Color = ThisApplication.TransientObjects.CreateColor(255, 0, 0)
doc.ComponentDefinition.Sketches.Item(1).Color = red
' you need to update before the change get visable
doc.Update()

Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Blog: hjalte.nl - github.com