iLogic color iFeature in drawing

iLogic color iFeature in drawing

petr.meduna
Advocate Advocate
520 Views
2 Replies
Message 1 of 3

iLogic color iFeature in drawing

petr.meduna
Advocate
Advocate

Hello,

I have a lot of parts from frame generator, each part with inserted iFeature. I would like to change color or highlight this iFeature in drawing. Is there any simple way to do this via iLogic? 

 

Thanks for any suggestion.

0 Likes
Accepted solutions (1)
521 Views
2 Replies
Replies (2)
Message 2 of 3

dutt.thakar
Collaborator
Collaborator
Accepted solution

@petr.meduna 

 

Can you try the below code and see if that is something you are looking for? It will assign red color to each of the iFeatures on your part. I have checked with the part you attached and it is working quite fine.

 

Dim oDoc As DrawingDocument = ThisApplication.ActiveDocument
Dim oSheet As Sheet = oDoc.ActiveSheet
Dim oView As DrawingView = oSheet.DrawingViews.Item(1)
Dim oDC As PartDocument = oView.ReferencedDocumentDescriptor.ReferencedDocument
Dim oCurve As DrawingCurve
For Each oFeat As iFeature In oDC.ComponentDefinition.Features.iFeatures
	Dim obj As Object = oFeat
	For Each oCurve In oView.DrawingCurves(obj)
		oCurve.Color = ThisApplication.TransientObjects.CreateColor(255, 0, 0) 'You can change the numbers here to change the color.
	Next

Next

 Hope this will help you.

If this answer has solved your problem please ACCEPT SOLUTION and hit like if you found it helpful..!


Regards,
Dutt Thakar
LinkedIn
0 Likes
Message 3 of 3

petr.meduna
Advocate
Advocate

Many thanks. That's exactly what I needed.

0 Likes