LanloyLisp Posted May 23 Posted May 23 (DEFUN c:test () (setq main (CAR (ENTSEL)) e (tblobjname "block" (cdr (assoc 2 (entget main)))) e1 e) (while (setq e1 (entnext e1)) (setq eng (entget e1)) (if (eq (cdr (assoc 0 eng)) "MTEXT") (entmod (subst (cons 41 0.)(assoc 41 eng) eng)) ) ) (entupd main) (princ) ) Hi Everyone! It's been a while again.. Is there any way we can remove the bounding box of an MText in a Dimension? Above code works temporarily, but when the object is moved it goes back to its original form. Quote
pkenewell Posted May 23 Posted May 23 @LanloyLisp Are you referring to the Background Mask? If so - Check out this: https://www.lee-mac.com/mask.html Quote
LanloyLisp Posted May 23 Author Posted May 23 @pkenewell I'm trying to reduce the text's rectangular width of dimensions to keep the background mask highlighting only the text. Quote
pkenewell Posted May 23 Posted May 23 @LanloyLisp Sorry but I don't think that is possible for normal dimensions. If anything - it would require not only customizing the dimension block, but adding a reactor to the dimensions to maintain the customized elements when doing any modification to them. I'm not sure even if the reactor will work because of creating a circular reference. If someone else is willing to attempt that challenge they are welcome to, but It's way more than I have time for. Quote
LanloyLisp Posted May 23 Author Posted May 23 No worries pkenewell. It seems the dimension text is constantly changing handles when edited with its own reactor. We'll see if some other CAD masters may have something to suggest. 1 Quote
troggarf Posted May 23 Posted May 23 In order to display the text box around dimensions someone probably added a negative sign at the front of the Text Offset in the properties palette. If you remove the negative, the box will go away. And if anyone wants to have a box around their dimensions.... Add a negative sign to the Text offset... Quote
Danielm103 Posted May 24 Posted May 24 (edited) BTY, overrides are stored in XDATA, here’s a sample in python to clear the overrides. Though, it’s recommended that you not nuke the whole data. Just clear the inside DSTYLE section docs: https://help.autodesk.com/view/OARX/2018/ENU/?guid=OREF-Dimension_Style_Overrides should be able to port to lisp import traceback from pyrx_imp import Rx, Ge, Gi, Db, Ap, Ed def PyRxCmd_doit() -> None: try: xd = [(1001, "ACAD"),(1000 , "DSTYLE"), (1002 , "{"),(1002 , "}")] db = Db.curDb() ids = db.objectIds(Db.Dimension.desc()) dims = [Db.Dimension(id, Db.OpenMode.kForWrite) for id in ids] for dim in dims: if dim.hasXData("ACAD"): dim.setXData(xd) except Exception as err: traceback.print_exception(err) Edited May 24 by Danielm103 added docs Quote
LanloyLisp Posted May 24 Author Posted May 24 @Danielm103 I think modifying the DSTYLE xdata doesn't affect the ruler width shown above. @troggarf Turning on and off the text frame doesn't affect it as well. Quote
Recommended Posts
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.