Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/26/2024 in all areas

  1. I think this will help you: (defun c:pp() (setq ed (entget (car (entsel "select image ")))) (strcat " X= " (rtos (cadr (assoc 10 ed))) " Y= " (rtos (caddr (assoc 10 ed))) " dX= " (rtos (* (cadr (assoc 11 ed)) (cadr (assoc 13 ed)))) " dY= " (rtos (* (caddr (assoc 12 ed)) (caddr (assoc 13 ed))))) )
    1 point
  2. This seems to work: https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/list-of-xrefs/td-p/1898983 So, it depends what you want. I made "a.dwg", "b.dwg", "c.dwg", "d.dwg" "b.dwg" has 2 xrefs attached: "c.dwg" as attached xref, and "d.dwg" as overlay XREF. Now on "a.dwg" I attach "b.dwg" "c.dwg" will appear in the XREFS in "a.dwg", "d.dwg" will not. THat's exactly what ATTACH/OVERLAY is intended for. So, what my scrip here below does, is list the XREFS as they are listed in the XREFS pane. Are you happy with this? Anything more you want with this? ;======================================================================= ;;Make and sort table of xref's ;; (defun TXREF (/ tst1 LXREF LXREFPATH) (setq MTBLE (tblnext "block" t) LXREF nil) (while (/= MTBLE nil) (setq tst1 (assoc 1 MTBLE)); path of xref (if (/= tst1 nil) (progn (setq LXREF (append LXREF (list (cdr (assoc 2 MTBLE))))) ;xref name (setq LXREFPATH (append LXREFPATH (list (cdr (assoc 1 MTBLE))))) ;xref name );end progn );end if (setq MTBLE (tblnext "block")) );end while (list LXREF LXREFPATH) ;; returns a list of the XREF name; then a list of the XREF paths );end defun (defun c:test ( / xrefs) (setq xrefs (TXREF)) (princ xrefs) (princ) )
    1 point
×
×
  • Create New...