Jump to content

Recommended Posts

Posted

hi all,

 

i'm wondering if there is a way to edit match properties so that i can match x and y locations.

 

yaw

Posted

primarily, text. but it'd be cool to be able to do that with everything.

Posted

I was gonne recommend the command CHANGE - but I can't find anything about matching coordinates.

 

For objects of the same type (eg. MTexts) you can edit X- and Y-coordinates of them all in one go. you can even use the Pick Point tool to pick a point to move all the MTexts to that point.

 

Blocks I'd assume you can do the same.

 

Line and PLines and such I doubt - but I can't see way it would be needed for them.

 

If this is somehting you do often, it might be a good idea to look into writing a Lisp for it.

Posted

I think LISP would be able to accomplish this quite easily. - so, if I understand it correctly, you want to be able to select some text and have other text in the same place or lined up in x and y directions.

Posted

I'm trying to do what Lee describes. I was hoping that match properties had some way of including other fields.

Posted
I'm trying to do what Lee describes. I was hoping that match properties had some way of including other fields.

 

Don't think so, but I'll see what I can do :)

Posted

Ok, I think this will only work for single-line DTEXT at the moment, but give it a go :)

 

(defun c:mcht (/ tEnt ss tpt objLst dir npt)
 (if (and (setq tEnt (car (entsel "\nSelect Text to Get Properties... ")))
      (member (cdadr (entget tEnt)) (list "TEXT" "MTEXT"))
      (setq ss (ssget (list (cons 0 "*TEXT")))))
   (progn
     (setq tpt (cdr (assoc 10 (entget tent)))
       objLst (mapcar 'entget (vl-remove-if 'listp (mapcar 'cadr (ssnamex ss)))))
     (sssetfirst nil ss) (initget 1 "X Y")
     (setq dir (getkword "\nWhich Co-ord to Match?  [X/Y]: "))
     (cond ((eq dir "X")
        (foreach obj objLst
          (setq npt (subst (car tpt) (cadr (assoc 10 obj)) (cdr (assoc 10 obj))))
          (entmod (subst (cons 10 npt) (assoc 10 obj) obj))))
       ((eq dir "Y")
        (foreach obj objLst
          (setq npt (subst (cadr tpt) (caddr (assoc 10 obj)) (cdr (assoc 10 obj))))
          (entmod (subst (cons 10 npt) (assoc 10 obj) obj)))))
     (sssetfirst nil nil))
   (princ "\n<!> No Text Selected, or this Isn't Text <!>"))
 (princ))
        

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