You need to put your selection function within a while loop that tests to see if an object has been selected. Here's an example:
Now it's quite some time since I did any serious LISPing and so there may be a more modern way to go about this but it does work. The user will continue to be prompted until an object is selected.Code:(setq obj nil) (while (= obj nil) (setq obj (entsel "\nSelect object: ")) )
If you only want a single object, entsel is simpler than ssget because no selection set is required.



Reply With Quote


It's nice to be nice, but sometimes is nicer to be evil!
and anyone who has done any programming/scripting should look for beauty in their code - don't you think?

Bookmarks