I’ve a bunch of blocks within a drawing, that I want to adjust the z value to hit a surface. I don’t want to create a new block on top of the existing at a z value. I want to set the z value of the existing blocks. Is there currently any way to read values of a block, and then adjust that? I can only see ways to place a new one at the new coordinates.
You could use the Object.Transform node for this. The coordinateSystem input can be a little confusing, but here’s how it works. Say you create a coordinate system with it’s origin at (0,0,100) and supply that as the input. This would move the object by 100 units in the Z direction. The transformation would be relative to where the object is currently located, so basically adding 100 units to whatever the current Z value is. The same thing would apply for rotation. If you needed to rotate an object by 30 degrees clockwise but not translate it, you would supply a coordinate system with origin (0,0,0) and rotated about the world Z-axis by 30 degrees (or whatever rotation axis you want, really).
So with that said, in this case you could get the surface elevations at each block insertion point (Surface.ElevationByXY would do the trick) and then create a list of coordinate systems at (0,0,elevation) with no rotation. Those would be the inputs for Object.Transform.
Note that this will apply the transformation every time the graph is run. So if you run it multiple times, the blocks will keep moving after every run by the same relative transformation.