JerryFiedler Posted October 28, 2021 Posted October 28, 2021 (edited) Greetings, I am writing a routine that, among other things, calls Lee Mac's program ms2ps. My routine calls ms2ps and then temporarily uses the copied objects while working in paper space. At the end of my routine I want to erase the copied objects that ms2ps put into paper space. I thought this would be fairly easy to do but it seems I was wrong! Around line 90 of his code, http://www.lee-mac.com/lisp/html/ms2psV1-0.html , I can see this is where the objects are copied. I thought this would be a good place to create a global variable which would contain a list of the paper space objects just created. I do not have the programming skills to accomplish that. What should I add to ms2ps. Edited October 28, 2021 by JerryFiedler Quote
mhupp Posted October 28, 2021 Posted October 28, 2021 That's about where you wanted to create it. (defun c:ms2ps (/ *error* ang doc enx idx lst mat nor scl sel) (setq SS (ssadd)) ;added on line 34 (defun *error* (msg) ) (vla-transformby obj mat) (ssadd (vlax-vla-object->ename obj) SS) ;added line 100 ) change the selection set name to something you don't use. erase them with this command. (defun EraseMS2PS () (foreach ent (vl-remove-if 'listp (mapcar 'cadr (ssnamex SS))) (entdel ent) ) ) only tested on a polyline and text. 1 Quote
JerryFiedler Posted October 28, 2021 Author Posted October 28, 2021 Thank you mhupp. Your code works exactly the way I want it to. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.