vlax-dump-object

Discussion in 'AutoCAD' started by Chang-HoonLee, Jul 13, 2004.

  1. I would like to save the collections of AutoCAD objects using (vlax-dump-object) to a file not a console window.
    Is there any way to do it?
     
    Chang-HoonLee, Jul 13, 2004
    #1
  2. I don't know how to retrieve text from the vlax-dump-object function - but you can use the following functions to get an objects available properties and methods:

    (defun f:vla-getlist ()
    (cond
    (*vla-getlist*)
    ((setq *vla-getlist* (mapcar (function (lambda (x) (substr x 9)))
    (vl-remove-if-not (function (lambda (x) (wcmatch (strcase x) "VLA-GET-*"))) (atoms-family 1))
    )
    );setq
    )
    )
    )

    (defun f:vl-property-available (en)
    (setq en (f:enx en))
    (vl-remove-if-not (function (lambda (x) (vlax-property-available-p en x)))
    (f:vla-getlist)
    )
    )

    (defun f:vla-methodlist ()
    (cond
    (*vla-methodlist*)
    ((setq *vla-methodlist* (mapcar (function (lambda (x) (substr x 5)))
    (vl-remove-if-not (function (lambda (x)
    (and
    (wcmatch (strcase x) "VLA-*")
    (not (wcmatch (strcase x) "VLA-GET-*,VLA-PUT-*"))
    );and
    )
    )
    (atoms-family 1)
    )
    )
    );setq
    )
    );cond
    )



    (defun f:vl-method-applicable (en)
    (setq en (f:enx en))
    (vl-remove-if-not (function (lambda (x) (vlax-method-applicable-p en x)))
    (f:vla-methodlist)
    )
    )

    (defun f:enx (en)
    (if (= (type en) 'ENAME)
    (vlax-ename->vla-object en)
    en
    )
    )

    Essentially - reduce the atoms-family list to all possible properties or methods - then use the vlax-property-available-p and the vlax-method-applicable-p functions to return only those that a given object has.

    Hope this helps

    Peter
     
    petersciganek, Jul 13, 2004
    #2
  3. Thank you for your advise.
    I'm sorry my question was not clear.
    What I meant is that how to get all the information that was scrolled in the console window and save them to a file .
    Because almost information is gone in the console window if using the following code.

    .....
    (model-space)
    (vlax-for obj *model-Space*
    (vlax-dump-object obj)
    )

    Thanks,


    )
     
    Chang-HoonLee, Jul 14, 2004
    #3
  4. Chang-HoonLee

    Jürg Menzi Guest

    Hi Chang-HoonLee

    It's maybe not the solution, but you can increase the number of lines in
    textscreen by this function:

    (defun C:SetCmdHistLines ( / ExLoop HstLin TmpPmt TmpVal)
    (setq HstLin (getenv "CmdHistLines"))
    (while (not ExLoop)
    (initget (+ 2 4))
    (setq TmpPmt (strcat "\nNew value for CmdHistLines <" HstLin ">: ")
    TmpVal (cond ((getint TmpPmt)) ((atoi HstLin)))
    )
    (if (or (< TmpVal 25) (> TmpVal 2048))
    (princ "must be a value between 25 and 2048. ")
    (progn
    (setenv "CmdHistLines" (itoa TmpVal))
    (setq ExLoop T)
    )
    )
    )
    (princ)
    )

    Cheers
     
    Jürg Menzi, Jul 14, 2004
    #4
  5. Thank you for your advice!

    ChangHoon Lee / 9sq Corporation
     
    Chang-HoonLee, Jul 15, 2004
    #5
  6. Chang-HoonLee

    wkai Guest

    That is the answer of question.
    Thank you very much,petersciganek!
     
    wkai, Dec 30, 2004
    #6
  7. Chang-HoonLee

    Adesu Guest

    Hi Jürg,where I find "CmdHistLines",could you point me?,thanks.
     
    Adesu, Dec 30, 2004
    #7
  8. Chang-HoonLee

    MP Guest

    it is one of the environment variables used by autocad
    here's a note i saved from post some time ago on another ng
    The easiest way to view the system environment variables (they are quite
    useful) is to start a MS-DOS shell and write 'Set'. This will list all of
    them.

    Rune Wold
    System Analyst
    Engineering Systems

    <snip
     
    MP, Dec 30, 2004
    #8
  9. Chang-HoonLee

    MP Guest

    well, i just tried that and it didn't print all of them
    sorry, but maybe it 's a start for your research
     
    MP, Dec 30, 2004
    #9
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.