Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Bad Exists MText..........????????

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
neam
340 Views, 5 Replies

Bad Exists MText..........????????

Hi Everyone:

How to change the selected Existing MText into the same format.

For example:

change fill border: cons (62 . 4)

change background mask: "No or Yes" cons (90 . 1) or (90 . 2) or (90 . 3)

change background mask fill color: (Fill Color: Use drawing background color) or (Fill Color: background color)

cons (63 . 121)

Preferably, these parameters should be entered by the user first.

 

I tried but did not get good results:

(initget "Enabled Disabled")
(setq str90 (cond ((getkword "\nChoose Background Mask [Enabled/Disabled] <Enabled>: ")) ("Enabled")))
(if (= str90 "Enabled")
(setq num90 3)
)
(if (= str90 "Disabled")
(setq num90 2)
)
(setq num62 (getint "\nEnter MText Border Color:"))

(prompt "\nSelect MText")
(setq ss (ssget '((0 . "MTEXT"))))
(cond
(ss
(repeat (setq n (sslength ss))
(setq dxf_ent (entget (ssname ss (setq n (1- n)))))
(entmod (append dxf_ent '((90 . 3) (63 . 50) (62 . 121) (45 . 2.0) (441 . 0))))
)
)
)

 

Thank you for your guidance

5 REPLIES 5
Message 2 of 6
Kent1Cooper
in reply to: neam

One thing I notice:  The DXF 90 entry is not a bit-coded value, that is, you can't add the 1 and 2 and use the sum of 3.  It must be 0, 1 or 2.  When I use that [only] with 2 in (entmod (append... it works for me to do background-color masking.

 

And another:  The DXF Reference does not list a 62 entry under Mtext.  That's a general entry, about the overall color number of the Mtext object, not about the fill border.

Kent Cooper, AIA
Message 3 of 6
neam
in reply to: Kent1Cooper

Thanks Kent1Cooper for reply.

Thank you for your guidance.

How to change the Fill color from: use drawing background color to Index color.

Message 4 of 6
neam
in reply to: Kent1Cooper

and: how to show border offset

Message 5 of 6
Kent1Cooper
in reply to: neam

See the DXF Reference for Mtext [DXF 45 for the size of the mask].  For the mask on and color assignment, try (append)ing (90 . 1) (63 . 50)

Kent Cooper, AIA
Message 6 of 6
neam
in reply to: Kent1Cooper

Again, thank you very much for your attention and guidance🙏🙏🙏.
As always your tips solved my problem.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report