Page 3 of 5 FirstFirst 12345 LastLast
Results 21 to 30 of 41

Thread: EXTRACT ATTRIBUTE DATA FROM SELECTED OBJECTS & CREATE TABLE IN MODEL SPACE

  1. #21
    All AUGI, all the time
    Join Date
    2010-10
    Posts
    535
    Login to Give a bone
    0

    Default Re: EXTRACT ATTRIBUTE DATA FROM SELECTED OBJECTS & CREATE TABLE IN MODEL SPACE

    Quote Originally Posted by stusic View Post
    I haven't modified it. I could use the IF statements with Vlips as suggested, but I've already got DosLib in place and distributed, so I didn't bother. I still use the code from my first post.
    Fair enough

  2. #22
    Design Visualization Moderator stusic's Avatar
    Join Date
    2004-10
    Location
    Denver, Colorado
    Posts
    1,515
    Login to Give a bone
    0

    Default Re: EXTRACT ATTRIBUTE DATA FROM SELECTED OBJECTS & CREATE TABLE IN MODEL SPACE

    Quote Originally Posted by james.126519 View Post
    I still can not get it to work? I have the LISP loaded, but the command line returns "Unknown command "DEXT""
    Have you tried dragging and dropping the lisp file into an open autocad window then typing DEXT?

  3. #23
    100 Club
    Join Date
    2006-11
    Location
    Martinsburg, WV USA
    Posts
    199
    Login to Give a bone
    0

    Default Re: EXTRACT ATTRIBUTE DATA FROM SELECTED OBJECTS & CREATE TABLE IN MODEL SPACE

    yes, still the same.

    When I load the LISP, I get this message:

    Command: (LOAD "E:/AutoCAD/LISP/ATTRIBUTE EXTRACT/DEXT.LSP") ; error: no
    function definition: DOS_DEMANDLOAD

  4. #24
    Design Visualization Moderator stusic's Avatar
    Join Date
    2004-10
    Location
    Denver, Colorado
    Posts
    1,515
    Login to Give a bone
    0

    Default Re: EXTRACT ATTRIBUTE DATA FROM SELECTED OBJECTS & CREATE TABLE IN MODEL SPACE

    Quote Originally Posted by james.126519 View Post
    yes, still the same.

    When I load the LISP, I get this message:

    Command: (LOAD "E:/AutoCAD/LISP/ATTRIBUTE EXTRACT/DEXT.LSP") ; error: no
    function definition: DOS_DEMANDLOAD
    Okay, that's part of the DosLib function. Make sure DOSLib18.arx (or DOSLib18x64.arx if you're 64-bit) is in your support path. I load it in my accaddoc.lsp, so you may want to add them there as well. Try manually loading DOSLib18.arx and dext.lsp manually, then see if it works. If it does, then add them to your startup. HTH.

  5. #25
    Design Visualization Moderator stusic's Avatar
    Join Date
    2004-10
    Location
    Denver, Colorado
    Posts
    1,515
    Login to Give a bone
    0

    Default Re: EXTRACT ATTRIBUTE DATA FROM SELECTED OBJECTS & CREATE TABLE IN MODEL SPACE

    Quote Originally Posted by stusic View Post
    Try manually loading DOSLib18.arx and dext.lsp manually
    This message brought to you by the Department of Redundancy Department.

  6. #26
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,719
    Login to Give a bone
    0

    Default Re: EXTRACT ATTRIBUTE DATA FROM SELECTED OBJECTS & CREATE TABLE IN MODEL SPACE

    I do not use dataextraxtion command, so take from this what you will:

    Code:
    (defun c:DEXT  (/ *error* dxe dwg myDwg oldVars source vars)
      
      ;;--------------------------------------------------------------------;
      ;; User defined variables:
      ;;--------------------------------------------------------------------;
      (setq dxe "C:\\Temp\\dext.dxe")                                        
      (setq dwg "C:\\Temp\\dext.dwg")
      (setq source "C:\\Temp\\dext-orig.dxe")
    
      ;;--------------------------------------------------------------------;
      ;; Main code
      ;;--------------------------------------------------------------------;
      (vl-load-com)
      (princ "\rDEXT ")
    
      (defun *error*  (msg)
        (and oldVars (mapcar 'setvar vars oldVars))
        (cond ((not msg))                                                   ; Normal exit
              ((member msg '("Function cancelled" "quit / exit abort")))    ; <esc> or (quit)
              ((princ (strcat "\n** Error: " msg " ** "))))                 ; Fatal error, display it
        (princ))
    
      (prompt "\n\nPlease wait... ")
    
      (setq myDwg (strcat (getvar 'dwgprefix) (getvar 'dwgname))
            vars  '("CMDECHO" "FILEDIA")
            oldVars   (mapcar 'getvar vars))
      (mapcar 'setvar vars '(0 0))
    
      (setq acDoc (vla-get-activedocument (vlax-get-acad-object)))
      
      (foreach file  (list dxe dwg)
        (if (findfile file) (vl-file-delete file)))
      
      (if (findfile source)
        (vl-file-copy source dxe)
        (*error* (strcat (vl-filename-base source)
                         (vl-filename-extension source)
                         " not found")))
      
      (vla-saveas acDoc dwg acNative)
      
      (command "._-dataextraction" dxe "yes" '(-75 75 0))
      
      (vla-saveas acDoc myDwg acNative)
      
      (*error* nil)
      )
    Last edited by RenderMan; 2012-06-27 at 04:10 PM. Reason: Changed '(dxe dwg) to (list dxe dwg)
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

  7. #27
    Design Visualization Moderator stusic's Avatar
    Join Date
    2004-10
    Location
    Denver, Colorado
    Posts
    1,515
    Login to Give a bone
    0

    Default Re: EXTRACT ATTRIBUTE DATA FROM SELECTED OBJECTS & CREATE TABLE IN MODEL SPACE

    Your code has the elegance mine lacks. I haven't tried it yet, but it looks nice.

  8. #28
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,719
    Login to Give a bone
    0

    Default Re: EXTRACT ATTRIBUTE DATA FROM SELECTED OBJECTS & CREATE TABLE IN MODEL SPACE

    Quote Originally Posted by stusic View Post
    Your code has the elegance mine lacks. I haven't tried it yet, but it looks nice.
    That is kind of you to say, stusic.

    Given that the code is untested (on my end), I hope it works well.

    I was merely hoping to offer others an alternative that precludes the dependency on DOSLib (something which I do incorporate into our setup), given others' stated difficulty, or at least unfamiliarity with using ARXLOAD.

    Cheers!
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

  9. #29
    Design Visualization Moderator stusic's Avatar
    Join Date
    2004-10
    Location
    Denver, Colorado
    Posts
    1,515
    Login to Give a bone
    0

    Default Re: EXTRACT ATTRIBUTE DATA FROM SELECTED OBJECTS & CREATE TABLE IN MODEL SPACE

    Get an error: ** Error: bad argument type: stringp DXE **

  10. #30
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,719
    Login to Give a bone
    0

    Default Re: EXTRACT ATTRIBUTE DATA FROM SELECTED OBJECTS & CREATE TABLE IN MODEL SPACE

    Quote Originally Posted by stusic View Post
    Get an error: ** Error: bad argument type: stringp DXE **
    Sorry about that, stusic.

    I mistakenly had a bad line of code; had to change '(dxe dwg) to (list dxe dwg)... the code I posted here has been updated. I do not have any DXE templates, so my code bombs when I supply an empty file to the command call. Let me know how this works out.
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

Page 3 of 5 FirstFirst 12345 LastLast

Similar Threads

  1. Replies: 7
    Last Post: 2011-11-18, 12:08 PM
  2. Replies: 2
    Last Post: 2010-03-23, 07:22 PM
  3. Extract Attribute Data into a Table
    By KansasCAD in forum AutoCAD Tables
    Replies: 1
    Last Post: 2006-04-21, 02:59 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •