Oh yeah, I was using an abbreviated version of CAB's to get my list after you gents had helped me:
(defun c:GBN (/ data result)
(while
(setq data (tblnext "block" (null data)))
;(princ "\n Data :")
;(princ data)
(princ "\n ------------- cdr assoc 2 data ------------\n")
(princ (cdr(assoc 2 data)))
;(princ "\n +++++++++++++ cdr assoc 70 data +++++++++++\n")
;(princ (cdr(assoc 70 data)))
(princ "\n=============================================\n")
;; if it's not [xref, xref dependent, anonymous] ...
(if (zerop (logand 21 (cdr (assoc 70 data))))
(setq result (cons (cdr (assoc 2 data)) result))
) ; end if
) ; end while
)
I am going through altering my export routine to compensate for unloading the XREF's to see if that solves the long symbol names issue. Ultimately I am trying to open the file created by the export once completed. It would be nice if I could close the previous file, but that ends the session for the routine so I am not going to mess with it too much. Not sure this opening of the file is going to work either but I thought it would be slick for helping when handling background file creation.
Here is where I am so far with that:
(DEFUN c:aec()
(command "TILEMODE" 1)
(command "Zoom" "Extents")
(command "qsave")
(command "Undo" "Begin")
; rem out for speed
;(command "audit" "y")
;(command "qsave")
(command "purge" "all" "*" "n")
(command "purge" "all" "*" "n")
(command "purge" "all" "*" "n")
(command "qsave")
(vl-load-com)
(defun unloadxrefs (/ blks)
(setq blks (vla-get-blocks (vla-get-activedocument (vlax-get-acad-object))))
(vlax-for blk blks
(if (equal (vla-get-isxref blk) :vlax-true)
(progn (vla-unload blk)
(princ (strcat "\n Unloading XREF : " (vla-get-name blk) ".....next"))
)
)
)
(princ "\n XREF Unloading complete!!!\n")
(princ)
)
(unloadxrefs)
(setq myPath (getvar "DWGPREFIX"))
(princ "\n Current File Path : ")
(princ myPath)
(setq myFile (getvar "DWGNAME"))
(princ "\n Current File Name : ")
(princ myFile)
(princ "\n File suffix :")
(setq newSuffix (strcase "-AEC-Removed"))
(princ newSuffix)
(setq newName (strcat myFile newSuffix))
(princ "\n New file name : ")
(princ newName)
(setq newFile (strcat myPath newName))
(princ "\n New file to Open :\n")
(princ newFile)
(princ "\n continue.....")
(alert "\n AEC Objects will be removed. \n XREF's may require purging due to nesting of AEC objects. \n You will find your file with the '-AEC-Removed' suffix in the filename. \n Over-write the orginal files with these to clear the problematic objects.")
(command "-exporttoautocad")
(command "Prefix" ".")
(command "Suffix")
(command "-AEC-Removed")
(command "Bind")
(command "No" "" "")
(prompt "\n AEC Objects Removed and saved in the drawing with '-AEC-Removed.dwg' in the name. \n But... XREF's may still have them. \n If so, run the XREF's first then perform the removal on this file")
;(princ)
(command "Undo" "End")
(command "Undo" "Back" "Y")
(command "qsave")
;(command "open" newFile)
;(command "close")
(princ)
)
Trying to lookup/remember what I need to get rid of the .dwg on the end of the DWGNAME variable.
I know I am jumping around a bit, but the XREF pathed blocks could have been the cause of the long symbol names error on aec export. I may have been approaching the issue the wrong way. I may be way off with this AEC routine too, but I'm trying :ugly: