Convert Lisp command to VBA

Convert Lisp command to VBA

Anonymous
Not applicable
549 Views
1 Reply
Message 1 of 2

Convert Lisp command to VBA

Anonymous
Not applicable
To get the height of a piece of mtext, I would use the commands:
(setq text_last (entlast))
(setq mtext_height (cdr (assoc 43 (entget text_last))))

Code 43 of mtext is the height of the mtext.

I'm converting a lot of our lisp routines to VBA. How do I access code 43 of mtext using VBA commands?
0 Likes
550 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
Use the "Height" property of the text or mtext.

Here is a rough equivalent to your lisp:

Dim oMText As AcadMText

Set oMText = ThisDrawing.ModelSpace.Item(ThisDrawing.ModelSpace.Count - 1)

MsgBox oMText.Height

HTH

Gary
0 Likes