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
Solved! Go to Solution.
Solved by Kent1Cooper. Go to Solution.
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.
Thanks Kent1Cooper for reply.
Thank you for your guidance.
How to change the Fill color from: use drawing background color to Index color.
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)
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.