Well, it is easy enough to grab everything on that layer:
Dim objects() As NXObject = workPart.Layers.GetAllObjectsOnLayer(256)
When you move them, do you just want to translate all of them by some X and Y delta value?
Yes Steve that is correct. I want to select all objects on layer 256 and then move them in the X direction.
Will there be objects in the file that live on layer 256 that do not appear on the drawing?
If so we might need to obtain them differently.
Steve, there could be the possibility of objects living on layer 256 that are shown on a different sheet. For instance our titleblock is on layer 256 and will be used on other sheets if necessary but the objects will always be visible on those sheets.
Please try the attached. I only tested it with a part that had a few notes on the drawing that were on the target layer, so be sure it actually does what you wanted before you save any parts after running it.
Based on our earlier conversation, I had it ask for the current drawing, then find all visible objects on the drawing, then ask each one whether it was on the target layer, and if so, I put it in a special list.
Part of the code was from a recorded Journal, so you might find that there are some repeated lines or some others that are not strictly necessary. But I hope it is at least a good start.