You would need to wrap it in a command or function definition, such as in the attached [as a command]. I suspect that if you merely loaded the posted code without that "wrapping," it might be like pasting it into the Command: prompt line, and I find that gets thrown off by semi-colon-prefixed comments such as "; end command." It might possibly work that way if you remove those.
Adjust the content of the attached if you need to [see below], APPLOAD it, and type BlockVert [or something else if you also adjust that] to run the command.
Again, that's the barest routine, without error handling, Layer or Osnap control, object type filtering, etc.
If yourblockname would be something that is set into a variable value [e.g. by the earlier part of some longer routine], leave it un-quoted [but change the variable name to whatever you're using]. If you're talking about a specific always-the-same block name, put that in there in its place, *with* double-quotes around it.
If you want it to be executed from within something larger, remove the first and last lines and stick the rest in there. There are other possible variants [defining it as a function rather than as a command, without the C:, but that requires doing something different to use it] -- write back if you need adjustment.
--
Kent Cooper
jbear0000 wrote...
So how can I make this lisp work? ....
Kent Cooper, AIA