Jump to content

Changing Text Style of Selection


andfcam

Recommended Posts

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.

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...