Looking to make a selection set of points that are on a specific layer, and then create a dimension between, in this case, two points. I feel like it should be very simple, but I can't get it to work for the life of me. Here is the test code I've been playing around with:
[Posting the same question on two threads isn't a good idea, not least because someone who finds one of them later, looking for an answer to a similar question, will have no way of knowing that it was answered on another thread.]
See my reply to your other thread. I think you would be well served by spending some time looking over the entries in the AutoLISP Reference for the various functions involved, and becoming more familiar with the kinds of information they want as arguments, and the kinds of information they return. What you have is trying to apply various functions to various things to which they are not applicable.