I took a look at Ari's hatch pattern file, and my conclusion is that he is misunderstanding how a hatch pattern file works. A hatch pattern file has a certain structure that he's not following. Each line of code represents a vector line that will be repeated in both sides of the line, according to certain information given in the code. The format is like this:
Rotation Angle, Origin, Delta X for repetition, Delta Y for repetition, Uninterrupted length, -Length of gap before next repetition.
For example: 0, 0,10, 200,200, 390,-10
Represents a line that is horizontal (0 rotation angle), starts at 0,10 , repeats itself in X every 200, repeats itself in Y every 200, goes uninterrupted for 390 units, then stops and leaves a gap of 10 units before it repeats itself.
So that's why the hatch pattern for the metric CMU units that Ari is trying to do needs only 4 lines to draw the blocks. Everything else is created by the repetition of the following pattern (see attached file):
0, 0,10, 200,200, 390,-10
0, 0,200, 200,200, 390,-10
90, 0,10, 200,200, 190,-210
90, -10,10, 200,200, 190,-210
It does not make sense at all to write code for 14 courses of block, the only difference between those courses being the Y value of the lines' origin, to jump to the next course. Everything else is the same. That is one reason why that hatch pattern breaks when the wall has a different length or height, and also, the reason why the hatch pattern also shows in only one side of a wall in Revit; because the hatch pattern file does not follow the proper structure, so Revit doesn't know what to do with it.
In addition, it is perfectly possible to create a schedule in Revit that calculates the exact number of whole CMU blocks and the exact number of half CMU units needed for a certain wall of any height and length, given that these dimensions are multiples of the block's dimensions. The schedule needs some formulas, but there is no need for any further programming to achieve this.
Alfredo Medina
info@planta1.com
Alfredo Medina _________________________________________________________________ ______
Licensed Architect (Florida) | Freelance Instructor | Autodesk Expert Elite (on Revit) | Profile on Linkedin