devitg Posted January 16, 2010 Posted January 16, 2010 There is any way to send the result of the (vlax-dump-Object REGION-obj t) to a file? Up to now I do a COPY and Paste on notepad. But I guess how it can be save the result , so I can see all props and method related to a Vl-object, in a file. Or maybe there is an all different way . I have the AXPROPOS, but it send the result to the screen. Quote
rkmcswain Posted January 16, 2010 Posted January 16, 2010 The only way I see to do it, is to turn on the log file (LOGFILEON), run the function, then turn the log file off (LOGFILEOFF). The name of the log file is stored in LOGFILENAME. Quote
gile Posted January 16, 2010 Posted January 16, 2010 Hi, You can use the AutoCAD log file. (defun c:DumptoLogFile (/ obj) (and (setq obj (vlax-ename->vla-object (car (entsel)))) (setvar 'logfilemode 1) (vlax-dump-object obj T) (setvar 'logfilemode 0) (startapp "notepad" (getvar 'logfilename)) ) (princ) ) rkmcswain was faster... Quote
devitg Posted January 16, 2010 Author Posted January 16, 2010 Maybe I did some thing wrong , but the file have one line [ AutoCAD - Sat Jan 16 11:29:04 2010 ]---------------------------------------- corte 2 frente 140 x 200-acad 2004_1_1_2322.log.txt Quote
Lee Mac Posted January 16, 2010 Posted January 16, 2010 Seems to work OK for me This is the only change I would make to avoid error: (defun c:DumptoLogFile (/ ent) (and (setq ent (car (entsel))) (setvar 'logfilemode 1) (vlax-dump-object (vlax-ename->vla-object ent) T) (setvar 'logfilemode 0) (startapp "notepad" (getvar 'logfilename))) (princ)) Quote
devitg Posted January 16, 2010 Author Posted January 16, 2010 Hi Lee , it did not change [ AutoCAD - Sat Jan 16 11:29:04 2010 ]---------------------------------------- [ AutoCAD - Sat Jan 16 11:39:04 2010 ]---------------------------------------- [ AutoCAD - Sat Jan 16 11:42:08 2010 ]---------------------------------------- [ AutoCAD - Sat Jan 16 11:46:24 2010 ]---------------------------------------- [ AutoCAD - Sat Jan 16 11:49:34 2010 ]---------------------------------------- [ AutoCAD - Sat Jan 16 12:02:09 2010 ]---------------------------------------- [ AutoCAD - Sat Jan 16 12:02:54 2010 ]---------------------------------------- Quote
devitg Posted January 16, 2010 Author Posted January 16, 2010 I had dig on VLIDE, and found it . See attached. But it made a empty file . 0 bite Quote
gile Posted January 16, 2010 Posted January 16, 2010 Hi, The log file is a copy of the command line. If you run the routine from the vlide, the result is printed in the vlide console, not in command line, so nothing is copied to the log file. Try runing the routine in AutoCAD window... Quote
Lee Mac Posted January 16, 2010 Posted January 16, 2010 Gile, If this is the only way to get a return of vlax-dump-object, it makes me wonder how AxProps from MP works... axprops.zip Quote
devitg Posted January 16, 2010 Author Posted January 16, 2010 Hi, The log file is a copy of the command line. If you run the routine from the vlide, the result is printed in the vlide console, not in command line, so nothing is copied to the log file. Try runing the routine in AutoCAD window... Hi Gile , thanks. To run inside ACAD is the way, not at the vlide. Now It can be used to retrieve each object property. Quote
devitg Posted January 16, 2010 Author Posted January 16, 2010 Gile, If this is the only way to get a return of vlax-dump-object, it makes me wonder how AxProps from MP works... Hi Lee. Maybe it do the same, dig at the log file, but without showing it. I use AxProps all time. Quote
wizman Posted January 17, 2010 Posted January 17, 2010 I had dig on VLIDE, and found it . See attached. But it made a empty file . 0 bite toggle console is always open here and working fine, compiling all my console window outputs, try restarting ACAD, very useful in dumping long dumps like inspecting registry. Quote
devitg Posted January 17, 2010 Author Posted January 17, 2010 Hi Wizman. Could you please, give me the way to use it .? I can not make it work. Gabriel. Quote
wizman Posted January 18, 2010 Posted January 18, 2010 Hi Wizman. Could you please, give me the way to use it .? I can not make it work. Gabriel. Devitg, please try making a new log when you toggle it on. then restart ACAD. then see if it is working. If not, toggle it off, then toggle it on again and point to the same log file. it will ask to append to existing file, just click yes then try if it is working, you may also need to restart ACAD again.. I'm not sure sir if that will help Quote
devitg Posted January 18, 2010 Author Posted January 18, 2010 I will try it so. Thanks Gabriel. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.