Jump to content

Looking for dims with text override


samifox

Recommended Posts

Hi

 

I get an error from the people on the field about dimension I made that doesn’t make any sense. When I check it in the drawing I saw that I properly unintentionally gave it override value.

 

I decide to write a program that checks all dimensions entities in the drawing and highlight all dimensions entities with override applied.

 

That what I start writing,

But I can’t understand what going wrong

 

(defun C:test(/ mbr dim )

 (while (setq mbr (tblnext "DIMSTYLE" (null a)))
        (setq dim (entget (cdr (assoc 340 mbr))))
      	 
   	(if (not (equal (cdr(assoc 1 dim)) ""))
  (princ "override has been found")
)
   

 )
 )

 

Thanks

Shay

Link to comment
Share on other sites

DIMREASSOC > ALL will select all the dimensions that have text overrides applied. If you ESC out of the command before completing the command, you can use SELECT > Previous to re-select those objects. Once selected you can change them to another layer, change their color, Isolate them, or whatever else is needed.

Link to comment
Share on other sites

DIMREASSOC > ALL will select all the dimensions that have text overrides applied. If you ESC out of the command before completing the command, you can use SELECT > Previous to re-select those objects. Once selected you can change them to another layer, change their color, Isolate them, or whatever else is needed.

 

Nice one nestly, especially the SELECT > Previous tip! :beer:

Link to comment
Share on other sites

Hi

 

I get an error from the people on the field about dimension I made that doesn’t make any sense. When I check it in the drawing I saw that I properly unintentionally gave it override value.

 

I decide to write a program that checks all dimensions entities in the drawing and highlight all dimensions entities with override applied.

 

That what I start writing,

But I can’t understand what going wrong

 

(defun C:test(/ mbr dim )

 (while (setq mbr (tblnext "DIMSTYLE" (null a)))
        (setq dim (entget (cdr (assoc 340 mbr))))
      	 
   	(if (not (equal (cdr(assoc 1 dim)) ""))
  (princ "override has been found")
)
   

 )
 )

 

Thanks

Shay

 

DIMREASSOC > ALL will select all the dimensions that have text overrides applied. If you ESC out of the command before completing the command, you can use SELECT > Previous to re-select those objects. Once selected you can change them to another layer, change their color, Isolate them, or whatever else is needed.

 

Thanks but DIMREASSOC > ALL wont give me options, it jusr reassociate dimention lines to thier sponsers, i cant find anything to do with the text override issue

 

what am i missing?

 

Another way:

(defun c:dimov nil
   (sssetfirst nil (ssget "_X" '((0 . "*DIMENSION") (1 . "*?*"))))
   (princ)
)

 

? is whatever you find in the text override?

 

Lee, text override has nothing to do with XDATA right?

Link to comment
Share on other sites

Don't know, maybe try this... Untested...

 

(defun c:dimov nil
   (sssetfirst nil (ssget "_X" '((0 . "*DIMENSION") (-4 . "<not") (1 . "<>") (-4 . "not>"))))
   (princ)
)

Link to comment
Share on other sites

? is whatever you find in the text override?

 

See the documentation for the wcmatch function to understand this operator.

 

Lee, text override has nothing to do with XDATA right?

 

Correct, the text override is given by the value of the DXF Group 1 code; only Dimension Style overrides are stored in xdata attached to the dimension.

 

(defun c:dimov nil
   (sssetfirst nil (ssget "_X" '((0 . "*DIMENSION") (-4 . "<not") (1 . "<>") (-4 . "not>"))))
   (princ)
)

 

Note that your code will also select all dimensions without a text override (i.e. for which DXF group 1 = "").

 

To select all dimensions with a text override applied, but exclude those which contain the dimension value (i.e. for which the override contains ), I would suggest:

(defun c:dimov nil
   (sssetfirst nil (ssget "_X" '((0 . "*DIMENSION") (1 . "*?*") (1 . "~*<>*"))))
   (princ)
)

Link to comment
Share on other sites

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