Home  >  Support  >  progeCAD Questions
become a progeCAD superstar, earn points giving your friends CAD answers!

Why -xref routine loop to appload?

;;This is part of a lisp routine for cleaning up old drawings.

(defun C:XTEST (/ logofile)
(setq CMDD (getvar "cmddia"))
(setq logofile "C:\\CAD drafter files\\A_Templates\\HAL-TBLK-LOGO.dwg")
 (command "-xref"
 "" "" "" ""
 (setvar "cmddia" CMDD)
 ); end XTEST

When I run this it opens the xref dialog asking me to select the file, instead of using the location above. After selecting the file progecad 2013 opens the appload and asks me to select the lisp route to load again.

It must be a simple solution but I'm not seeing it.

asked 3 years ago in progeCAD AutoLISP by Howard / Level: Engineer (554 points)

2 Answers

1 like 0 dislike

I included CMDDIA and went to the basics(thanks). I found the reason the xref dialog was opening again. I removed an extra set of "" at the end of the xref command that was recalling xref. It works now so I put the routine back into the main program and I'm continuing forward.

Thanks again for the kick in the head.
answered 3 years ago by Howard / Level: Engineer (554 points)
0 like 0 dislike
I am guessing, and it has been a long time since I have debugged a lisp routine, and without a running progeCAD at this location I am at a big disadvantage but I would look to some basics that may be getting interpreted incorrectly by the lisp compiler: The spaces in your file path, the back slashes in your file path, and, possibly, using cmddia in the place of filedia. I have my doubts about being correct about any of this but it could be the new progeCAD interprets lisp in a different manner than before, perhaps expecting to have file paths escaped, or expecting symbols that it differentiates from menu macro symbols. I doubt that, but there are still bugs to be exorcised. If I recall correctly there was a time when you specified forward slashes in file paths, since back slashes were for pause in a menu macro. Hopefully something I have mentioned here will help...

Thanks for your patience. Now back to your regularly scheduled programming...
answered 3 years ago by Scott H / Level: Engineering Manager (5,713 points)

Please log in or register to answer this question.

Related questions