Ok, so Im near completing this macro for work and Ive come to another road block.. I have created a macro that does a swept cut from a curve and a circle that the macro created. Now this is to show a deviation so Id like the swept cut appearance to be red. I have done searches and Ive come up with ways to change the face, and have tried to implement it in my code with absolutely no success. Can someone please guide me and what I may need to add to my code..below is my code..thank you very much
Sub extrude()
Dim Nombre As String
Nombre = fb_ExtrFeature 'name of the curve
NOMBRE2 = NOM 'name of the circle
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
boolstatus = Part.Extension.SelectByID2(NOMBRE2, "SKETCH", 0, 0, 0, False, 0, Nothing, 0)
boolstatus = Part.SelectedFeatureProperties(0, 0, 0, 0, 0, 0, 0, 1, 0, NOMBRE2)
boolstatus = Part.Extension.SelectByID2(NOMBRE2, "SKETCH", 0, 0, 0, True, 0, Nothing, 0)
boolstatus = Part.Extension.SelectByID2(Nombre, "REFERENCECURVES", 0, 0, 0, True, 0, Nothing, 0)
Part.ClearSelection2 True
boolstatus = Part.Extension.SelectByID2(NOMBRE2, "SKETCH", 0, 0, 0, False, 1, Nothing, 0)
boolstatus = Part.Extension.SelectByID2(Nombre, "REFERENCECURVES", 0, 0, 0, True, 4, Nothing, 0)
Dim myFeature As Object
Set myFeature = Part.FeatureManager.InsertCutSwept4(False, True, 0, False, False, 0, 0, False, 0, 0, 0, 0, True, True, 0, True, True, True, False)
Set sweep = Part.FeatureByPositionReverse(0)
sweep.Name = "Sweep"
'boolstatus = Part.SelectedFeatureProperties(RGB(1, 0, 0), 0, 0, 0, 0, 0, 0, 1, 0, "sweep") ' <==========doesnt do anything :-(
Part.ClearSelection2 True
End Sub
