Hi,
Here is an iLogic rule I worked up. This example changes the layer of the curves in a view. (the example prompts you to select the view)
' Select the DrawingView that has the drawing curves
' that you want to change to a different layer
Dim oDrawingView As DrawingView
oDrawingView = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kDrawingViewFilter, "Select a drawing view.")
Dim oDrwCurveCollection As ObjectCollection
oDrwCurveCollection = ThisApplication.TransientObjects.CreateObjectCollection
Dim oDrwCurve As DrawingCurve
' Get the drawing curves and the segments of the drawing curves
' and add them to the ObjectCollection
For Each oDrwCurve In oDrawingView.DrawingCurves
Dim oDrwCurveSeg As DrawingCurveSegment
For Each oDrwCurveSeg In oDrwCurve.Segments
oDrwCurveCollection.Add(oDrwCurveSeg)
Next oDrwCurveSeg
Next
Dim oSheet As Sheet
oSheet = oDrawingView.Parent
' Get a layer to move the drawing curve segments to
Dim oLayer As Layer
'Try one of these layers
'oLayer = ThisDoc.Document.StylesManager.Layers.Item("Bend Centerline (ANSI)")
oLayer = ThisDoc.Document.StylesManager.Layers.Item("Visible (ANSI)")
Call oSheet.ChangeLayer(oDrwCurveCollection, oLayer)
Thanks,
Wayne
Wayne Brill
Developer Technical Services
Autodesk Developer Network