(The rectangle only has one single path -- paths[0]. The path consists of 4 pathPoints, and each pathPoint is defined by a single anchor, an array of [x, y]. For some reason, you cannot set just the x coordinate in the bottom line -- you have to supply a new array.)

(Ed.: ... and I just saw your reply to Robin. This is Javascript, but you might be able to make it work in VB.)

I don't want to have a specified rectangle, I'd like to apply the degree as more of a corner effect. I tried incorporating the tangent code into the corner effects script below but it had an error. How do I change the offset to be a degree?

Rem CornerEffects.vbsRem An InDesign CS3 VBScriptRemRem Applies corner effects by redrawing the object.RemRem For more information on InDesign scripting, go to

"fourth point", "first two", "second and third", "last two", "odd points", "even points") Rem Store the current measurement units. myOldXUnits = myInDesign.ActiveDocument.ViewPreferences.HorizontalMeasurementUnits myOldYUnits = myInDesign.ActiveDocument.ViewPreferences.VerticalMeasurementUnits Rem Set the measurement units to points. myInDesign.ActiveDocument.ViewPreferences.HorizontalMeasurementUnits = idMeasurementUnits.idPoints myInDesign.ActiveDocument.ViewPreferences.VerticalMeasurementUnits = idMeasurementUnits.idPoints Set myDialog = myInDesign.Dialogs.Add myDialog.Name = "CornerEffects" With myDialog With .DialogColumns.Add With .BorderPanels.Add With .StaticTexts.Add .StaticLabel = "Corner Type:" End With Set myCornerEffectButtons = .RadiobuttonGroups.Add With myCornerEffectButtons With .RadiobuttonControls.Add .StaticLabel = "Rounded" .CheckedState = True End With With .RadiobuttonControls.Add .StaticLabel = "Inverse Rounded" End With With .RadiobuttonControls.Add .StaticLabel = "Bevel" End With With .RadiobuttonControls.Add .StaticLabel = "Inset" End With With .RadiobuttonControls.Add .StaticLabel = "Fancy" End With End With End With With .BorderPanels.Add With .DialogColumns.Add With .StaticTexts.Add .StaticLabel = "Options:" End With End With With .DialogColumns.Add With .DialogRows.Add With .DialogColumns.Add With .StaticTexts.Add .StaticLabel = "Offset:" .MinWidth = 60 End With End With With .DialogColumns.Add Set myOffsetEditbox = .MeasurementEditboxes.Add With myOffsetEditbox .EditValue = 12 End With End With End With With .DialogRows.Add With .DialogColumns.Add With .StaticTexts.Add .StaticLabel = "Pattern:" .MinWidth = 60 End With End With With .DialogColumns.Add Set myPatternDropdown = .Dropdowns.Add With myPatternDropdown .StringList = myStringList .SelectedIndex = 0 End With End With End With End With End With End With End With myReturn = myDialog.Show If myReturn = True Then Rem Get the values from the dialog box. myCornerType = myCornerEffectButtons.SelectedButton myOffset = myOffsetEditbox.EditValue myPattern = myStringList(myPatternDropdown.SelectedIndex) myDialog.Destroy Rem Iterate through the objects. For myCounter = 0 To UBound(myObjectList) myChangeCorners myObjectList(myCounter), myCornerType, myOffset, myPattern Next Rem Reset the measurement units. myInDesign.ActiveDocument.ViewPreferences.HorizontalMeasurementUnits = myOldXUnits myInDesign.ActiveDocument.ViewPreferences.VerticalMeasurementUnits = myOldYUnits Else myDialog.Destroy End IfEnd FunctionFunction myChangeCorners(myObject, myCornerType, myOffset, myPattern) For myPathCounter = 1 To myObject.Paths.Count Set myPath = myObject.Paths.Item(myPathCounter) ReDim myPointArray(0) For myPathPointCounter = 1 To myPath.PathPoints.Count Rem Is the point a qualifying point? If myPointTest(myPathPointCounter, myPath, myPattern) = False Then myX1 = myPath.PathPoints.Item(myPathPointCounter).LeftDirection(0) myY1 = myPath.PathPoints.Item(myPathPointCounter).LeftDirection(1) myX2 = myPath.PathPoints.Item(myPathPointCounter).Anchor(0) myY2 = myPath.PathPoints.Item(myPathPointCounter).Anchor(1) myX3 = myPath.PathPoints.Item(myPathPointCounter).RightDirection(0) myY3 = myPath.PathPoints.Item(myPathPointCounter).RightDirection(1) myPoint = Array(Array(myX1, myY1), Array(myX2, myY2), Array(myX3, myY3)) If Not (IsEmpty(myPointArray(0))) Then ReDim Preserve myPointArray(UBound(myPointArray) + 1) End If myPointArray(UBound(myPointArray)) = myPoint Else Set myPointA = myPath.PathPoints.Item(myPathPointCounter) myAnchor = myPointA.Anchor myX1 = myAnchor(0) myY1 = myAnchor(1) Rem myPointB is the *next* point on the path. If myPathPoint is the last point on the

path, then Rem myPointB is the first point on the path. If myPathPointCounter = (myPath.PathPoints.Count) Then Set myPointB = myPath.PathPoints.Item(1) Else Set myPointB = myPath.PathPoints.Item(myPathPointCounter + 1) End If myAnchor = myPointB.Anchor myX2 = myAnchor(0) myY2 = myAnchor(1) Rem myPointC is the *previous* point on the path. If myPathPoint is the first point on

the path, Rem then myPointC is the last point on the path. If myPathPointCounter = 1 Then Set myPointC = myPath.PathPoints.Item(myPath.PathPoints.Count) Else Set myPointC = myPath.PathPoints.Item(myPathPointCounter - 1) End If myAnchor = myPointC.Anchor myX3 = myAnchor(0) myY3 = myAnchor(1) myPoints = myAddPoints(myX1, myY1, myX2, myY2, myX3, myY3, myOffset) myNewX1 = myPoints(0) myNewY1 = myPoints(1) myNewX2 = myPoints(2) myNewY2 = myPoints(3) Rem Calculate new path point values based on the path effect type. Rem We won't add the points to the path one at a time instead, we'll Rem create an array that holds all of the point locations and curve Rem handle positions, and we will then Select Case myCornerType Case 0 Rem Rounded corner effect. myPoint = Array(Array(myNewX2, myNewY2), Array(myNewX2, myNewY2), Array(myX1,