Jump to content

Recommended Posts

Posted
Sorry, but I haven't figured it out yet. I think that it cannot be only done with AutoLisp but Visual Lisp and that I don't know anything

 

Using this reference that I posted earlier, one can see that Oblique Angle is achieved using the "\Q" formatting code, this can also be ascertained by checking the DXF Entity data of an MText Entity that has Obliquing applied.

 

Here is an example for use on non-formatted MText:

 

(defun c:test ( / in ob ss st ) (vl-load-com)
   (while
       (and
           (setq ob (getreal "\nSpecify Oblique Angle: "))
           (< 85.0 (abs ob))
       )
       (princ "\nOblique Angle must be -85 <= x <= 85")
   )

   (if (and ob (setq ss (ssget "_:L" '((0 . "MTEXT") (1 . "~*\\Q*")))))
       (repeat (setq in (sslength ss))
           (setq st "")
           (foreach x  (entget (ssname ss (setq in (1- in))))
               (if (member (car x)'(1 3)) (setq st (strcat st (cdr x))))
           )
           (vla-put-textstring (vlax-ename->vla-object (ssname ss in))
               (strcat "{\\Q" (rtos ob 2) ";" st "}")
           )
       )
   )
   (princ)
)

  • Replies 22
  • Created
  • Last Reply

Top Posters In This Topic

  • pBe

    7

  • giovanni64

    7

  • Lee Mac

    4

  • eldon

    3

Top Posters In This Topic

Posted

Hi Lee Mac,

 

Thank you very much for your code which perfectly works.

I'm really embarrassed and very happy at the same time.

Now I try to figure out your code to make myself understand how it was accomplished.

 

:D

 

giovanni64

Posted

You're very welcome giovanni - there is no need to be embarrassed, we all have to start somewhere :)

 

If you have any questions about the code I have posted, please do ask :thumbsup:

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...