SilasH
New member
- Dec 19, 2006
- 70
I'm attempting to make a macro (not something that I'm very good at) that given a width and height of a plate, will create a centered array of holes at 2" on center. I can get it to create the right number of holes, but I can't get them to center, so that I often end up .75" from one side and 1.25" from the other side.
The code Part.Parameter("DimA@Sketch1").SystemValue = (Insert formula here) doesn't seem to be taking. If I set it equal to a simple numerical value, however, it changes. The actual formula I used is
Width / 2 + 1 / 39.3700787 - ((39.3700787 * Width + 1.25) \ 2)
where Width is defined in inches, and I know that it is defined, since the formula to determine the number of holes uses it (that's the second half of the above equation). I'm at a bit of a loss here.
The code Part.Parameter("DimA@Sketch1").SystemValue = (Insert formula here) doesn't seem to be taking. If I set it equal to a simple numerical value, however, it changes. The actual formula I used is
Width / 2 + 1 / 39.3700787 - ((39.3700787 * Width + 1.25) \ 2)
where Width is defined in inches, and I know that it is defined, since the formula to determine the number of holes uses it (that's the second half of the above equation). I'm at a bit of a loss here.