andfcam Posted September 30, 2016 Share Posted September 30, 2016 Hi, As you'll probably realise, I'm new to AutoLISP and LISP in general. The function I'm trying to write selects the text on a layer and changes its style. Unfortunately, I'm getting nowhere through trial and error, so I'm resorting to your help. I'm sure the problem lies with my poor knowledge of the data types. Here's a basic version of the program: (defun C:cts () (vl-load-com) (setq sel1 (ssget "X" '((8 . "Levels")(0 . "TEXT")))) (vlax-put-property sel1 'StyleName "NORMAL") (princ) ) I had tried a combination of vlax-for, vlax-ename->vla-object, but I'm starting to think this approach isn't possible and I need a new approach. Any help would be greatly appreciated. Apologies for the terrible code. Quote Link to comment Share on other sites More sharing options...
ReMark Posted September 30, 2016 Share Posted September 30, 2016 Why don't you search for previously written lisp routines that do the exact same thing and see how the authors handled it in their code? Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted September 30, 2016 Share Posted September 30, 2016 I had tried a combination of vlax-for, vlax-ename->vla-object, but I'm starting to think this approach isn't possible and I need a new approach. See this tutorial for how to process your selection set sel1; you might also find this recent thread useful. Quote Link to comment Share on other sites More sharing options...
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.