xref name of file

Discussion in 'AutoCAD' started by daniel olives, Nov 25, 2004.

  1. Hello,
    In this news letters there is a lisp propram named getxref !

    http://www.afralisp.com/newsletter/2002/2002-11.htm

    I have a litle problem with it ! In the texte file I find the name
    of xref, but I want the name(s) of the file(s) with path or not !

    How did I have to modified it to do that ?

    Thanks, Daniel
     
    daniel olives, Nov 25, 2004
    #1
  2. daniel olives

    LUCAS Guest

    ;;By LUCAS
    (defun GETXREF (/ ITEM ABLOCK ABLOCK_PATH THELIST)
    (vl-load-com)
    (vlax-for ITEM (vla-get-blocks
    (vla-get-activedocument (vlax-get-acad-object))
    )
    (if (= (vlax-get-property ITEM 'ISXREF) :vlax-true)
    (progn
    (setq ABLOCK (vlax-get-property ITEM 'NAME))
    (if
    (not
    (setq ABLOCK_PATH (findfile (vlax-get-property ITEM 'PATH)))
    )
    (if (not (setq ABLOCK_PATH
    (findfile (strcat (getvar "DWGPREFIX")
    (vl-filename-base (vla-get-path ITEM))
    ".dwg"
    )
    )
    )
    )
    (setq ABLOCK_PATH "Sorry!no file find!")
    )
    )
    (setq THELIST (append (list (list ABLOCK ABLOCK_PATH)) THELIST))
    )
    )
    )
    THELIST
    )
     
    LUCAS, Nov 26, 2004
    #2
  3. daniel olives

    LUCAS Guest

    ;;change
    (if (not (setq ABLOCK_PATH
    (findfile (strcat (vl-filename-base (vla-get-path ITEM))
    ".dwg"
    )
    )
    )
    )
    (setq ABLOCK_PATH "Sorry!no file find!")
    )

     
    LUCAS, Nov 26, 2004
    #3
  4. LUCAS avait écrit le 26/11/2004 :
    Thaks for your help !
    Daniel
    (french user !)
     
    daniel olives, Nov 26, 2004
    #4
  5. daniel olives a émis l'idée suivante :
    Hello,
    Sorry but I have an error ActiveX !

    ; erreur: Le serveur ActiveX a renvoyé l'erreur: nom inconnu: Path

    ;error: ActiveX server return : name unkow: Path

    I am in Autocad 2004 (french version !)

    Daniel
     
    daniel olives, Nov 26, 2004
    #5
  6. daniel olives avait énoncé :
    Hello,
    With "change" it now ok !
    But I want the list of xref name files,
    listed in a .txt file "listxref.txt"
    Thank's for your help !
    Daniel
     
    OLIVES Daniel, Nov 26, 2004
    #6
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.