you cannot plot a dbx doc.
I believe this is because a dbx doc does not cause acad to generate a display list, or read the data to fill in any
settings a normal acad session would.
Its the raw database info, and you can only select with filter methods, not anything graphical.
You cannot do a regen on a dbx doc, and plotting essentially regens the drawing and spits out crunched info from display
|>Is it possible for the drawing to load xrefs when using ODBX method to open drawings. I like to plot using ODBX to but only if it see the Xrefs.
Civil Engineer and Programmer
jmaeding - at - hunsaker - dotcom
If you are still having problems, i have a batchlisp file, thta you just change the name of lisp you want to run in every file, or it can be tweaked to just run simple commands without having to attach another lisp to it.
if you still need help emial me directly
Edited by: mayhap on Aug 20, 2009 12:18 PM
I only use the script file to load and run the lisp file.
Be sure to issue the save and quit commands at the end of lisp file.;
If you are still having problems I'll be happy to take a look and the lisp and script.
Your script and lisp should look something like this
(load "directory/lisp file name")
test ;;;dont forget to include 1 enter
Edited by: sdanis on Aug 29, 2009 1:05 AM
(command ".undo" "group")
(setq BLKDATA (tblnext "BLOCK" t))
(setq NEWCOLOR (cons 62 256)) ;this will set 62 (color) to bylayer
; (setq NEWLAYER (cons 8 "0")) ;this will set 8 (layer) to 0
; (setq NEWLW (cons 370 256)) ;this will set 370 (lineweight) to bylayer
; While there is an entry in the block table to process, continue
(prompt "\nRedefining colors for block: ")
(princ (cdr (assoc 2 BLKDATA)))
; Check to see if block is an XREF or is XREF dependent
(setq XREFFLAG (assoc 1 BLKDATA))
(setq XDEPFLAG (cdr (assoc 70 BLKDATA)))
; If block is not XREF or XREF dependent, i.e., regular block, then proceed.
(if (and (not XREFFLAG) (/= (logand XDEPFLAG 32) 32))
(setq BLKENTNAME (cdr (assoc -2 BLKDATA)))
(setq COUNT 1)
; As long as we haven't reached the end of the block's defintion, get the data
; for each entity and change its color assignment to BYLAYER.
(setq ENTDATA (entget BLKENTNAME)); get entities data
(setq OLDCOLOR (assoc 62 ENTDATA)) ;get entities old color value
(if OLDCOLOR ; if value exist (null = bylayer)
(entmod (subst newcolor oldcolor ENTDATA)) ; substitute old color to byblock
(entmod (cons newcolor ENTDATA)) ; modify ent data w/ byblock values
(setq OLDLW (assoc 370 ENTDATA)) ;get entities old lweight value
(if OLDLW ; if value exist (null = bylayer)
(entmod (subst newlw oldlw ENTDATA)) ; substitute old lweight to bylayer
(entmod (cons newlw ENTDATA)) ; modify ent data w/ bylayer values
(setq BLKENTNAME (entnext BLKENTNAME)) ;if attributes exist, then edit next one
(setq COUNT (+ COUNT 1));
) ;end while for attribute trap
(princ " XREF...skipping!")
);end if not an Xref
(setq BLKDATA (tblnext "BLOCK")) ;next block please
) ;end while loop of blk data available to edit
(command ".undo" "end")
(PROMPT "\nDone... ")
;;here I would add
My script would look like this:
"only 1 enter"
The Bat file looks fine.
Edited by: sdanis on Aug 31, 2009 5:08 PM
Edited by: sdanis on Aug 31, 2009 5:12 PM