First thx for your replay.
I dont knew what you meen with "watch". How can I make a watch?
The VBA code opens all planarsketches and look them up for a sketch called "draw".
If a sketch is found, it sets all curves to visible in the drawing sheet.
But not text boxes and everything else. But I need all invormation to be visible.
One solution is to set the "text" visible too.
Or simple set all informations visible.
' change color to red
Dim oColorZEI As Color
Set oColorZEI = oNewLayerZEI.Color
oColorZEI.Red = "0"
oColorZEI.Green = "191"
oColorZEI.Blue = "255"
oNewLayerZEI.Color = oColorZEI
oNewLayerZEI.LineType = LineTypeEnum.kContinuousLineType
' Get the TransientsObjects object to use later.
Dim transObjsZEI As TransientObjects
Set transObjsZEI = ThisApplication.TransientObjects
Set oViewA = oDrawingDoc.ActiveSheet.DrawingViews(1)
Dim drawcurvesZEI As DrawingCurvesEnumerator
Set drawcurvesZEI = oViewA.DrawingCurves(oSketchProxyZEI)
If Err.Number = 0 Then
On Error GoTo 0
' Create an empty collection.
Dim objCollZEI As ObjectCollection
Set objCollZEI = transObjsZEI.CreateObjectCollection()
' Add the curve segments to the collection.
Dim drawCurveZEI As DrawingCurve
For Each drawCurveZEI In drawcurvesZEI
Dim segmentZEI As DrawingCurveSegment
For Each segmentZEI In drawCurveZEI.Segments
objCollZEI.Add segmentZEI
Next
Next
' Change the layer of all of the segments.
Call oViewA.Parent.ChangeLayer(objCollZEI, oNewLayerZEI)
End If
In VBA Code the code
' Add the curve segments to the collection.
Dim drawCurveZEI As DrawingCurve
For Each drawCurveZEI In drawcurvesZEI
Dim segmentZEI As DrawingCurveSegment
For Each segmentZEI In drawCurveZEI.Segments
objCollZEI.Add segmentZEI
Next
Next
Has to be changed to add all invormation or add text as well. But I dont knew how I can add the text or all.