Message 1 of 5

Not applicable
04-04-2015
03:37 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all,
I am having a problem with multiple xrefs in one layout. We have base drawing copied around drawing and X-clipped as it is used as enlaged plan of a different spaces. Thing is that I need to inser xref with other info and overlay the certain drawings.
At the moment, I am dong it manually, attach x-ref "N", look at the insert point of the "moved" base drawing and then type to change insert point of "N".
I was looking around web but i couldnt find the right solution.
I founf this code posted on cad tutor link
with this code below, but unfortunately it doesent work...
If anyone can spot the roblem or has another solution I would appreciate.
Thanks
Jan
(defun C:xer (/ 1ent 1elist 1inspnt 2ent 2elist temp) (acet-error-init (list (list "cmdecho" 0 "osmode" (getvar "osmode") "clayer" (getvar "clayer") "attdia" (getvar "attdia") );list T );list );acet-error-init (layerstate-save "temp" 239 nil) (setq 1ent (entsel "\nSelect the source XREF with the desired insertion point: ")) (setq 1elist(entget (car 1ent))) (setq 1inspnt (cdr (assoc 10 1elist))) (setq 1nestent (nentselp (cadr 1ent))) (setq 1nestlist (entget (car 1nestent))) (setq 1nentlay (cdr (assoc 8 1nestlist))) (if (vl-string-search "|" 1nentlay) (alert "yeah!") (alert "Object selected is not an xref. Please try again.")) (setq 2ent (entsel "\nSelect the destination XREF to be moved: ")) (setq 2elist (entget 2ent)) (command ".layer" "unlock" "*" "") (setq 2elist (subst (cons 10 1inspnt)(assoc 10 2elist) 2elist)) (entmod 2elist) (entupd 2ent) (layerstate-restore "temp") (layerstate-delete "temp") (command ".regenall") (setvar "CLAYER" CLay) (setvar "OSMODE" OMode) (setvar "CMDECHO" CEcho) (setvar "ATTDIA" ATTDIAmode) (acet-error-restore) (princ) )
Solved! Go to Solution.