Message 1 of 2

Not applicable
05-22-2018
01:57 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am having Trouble Incrementing a Variable inside a loop
Here is my code.
Every loop I want to iterate through the Range and subtract from my radius
Any Help is welcome
For Each cell In DataRange2.Cells ReDim Preserve myArray(x) myArray(x) = cell.Value centerSet = myArray(x) Dim dotRad1 as Variant center(0) = newSet: center(1) = centerSet: center(2) = 0 ' Define the hatch patternName = "solid" PatternType = 0 bAssociativity = True ' Create the associative Hatch object Set hatchObj = ThisDrawing.ModelSpace.AddHatch(PatternType, patternName, bAssociativity) ' Create the outer boundary for the hatch. (a circle) center(0) = newSet: center(1) = centerSet: center(2) = 0 radius = dotrad1 Set outerLoop(0) = ThisDrawing.ModelSpace.AddCircle(center, radius) ' Append the outer boundary to the hatch ' object, and display the hatch hatchObj.AppendOuterLoop (outerLoop) hatchObj.Evaluate ThisDrawing.Regen True hatchObj.Update dotRad1 = dotRad1 - ("Some Value Dosent matter") "Here at the dotRad1 var I would like to subtract from the var and sent the new value back to the top of the loop " Next cell
Solved! Go to Solution.