plackowski Posted December 22, 2016 Posted December 22, 2016 My company has a variety of company-wide tools in a Menu drop-down. One of them opens a dialog box that lets you stamp drawings for issuing. You fill out a bunch of info in the dialog box (like the date and reason for issuing the drawing), and then you can place the stamp in the drawing. However, as soon as I add my ACADDOC.lsp with my custom lisp routines to the Support File Search Path and restart autocad, this tool malfunctions. I can still fill out the dialog box, but once I click to place the stamp, the command line prompts me for the scale, rotation, and data that I already entered. There is also an error: Specify insertion point: ERROR: bad argument value: AutoCAD command: #<SUBR @000000003ddb6318 PAUSE>Specify insertion point or [basepoint/Scale/X/Y/Z/Rotate]: Enter X scale factor, specify opposite corner, or [Corner/XYZ] <1>: Enter Y scale factor <use X scale factor>: Specify rotation angle <0.0000>: Enter attribute values MONTH/DAY/YEAR: DECEMBER 22, 2016 Any thoughts on how to resolve this? I thought maybe I was running two ACADDOC files, but I tried running (findfile "ACADDOC.lsp") before adding my own to the search path and it came back with nil. Quote
Aftertouch Posted December 22, 2016 Posted December 22, 2016 If i may gues, i think some variables are not set to local? Wich may conflicyt with the other tool??? (defun C:test ([b]/ <local variables here[/b]) ) Quote
plackowski Posted December 22, 2016 Author Posted December 22, 2016 Variables in my lisps or theirs? Quote
Aftertouch Posted December 22, 2016 Posted December 22, 2016 if there lisp uses a variable, that is not made local, it can be used by all other lisps too. like this.... (defun C:TEST () (setq testvariable 1) (princ) ) (defun C:SECONDTEST () (cond ((= testvariable 1) (<do something>) ) ) (princ) ) As i read your error, it looks like it's getting an argument for the insertionpoint wich it cannot use as such. Quote
Roy_043 Posted December 22, 2016 Posted December 22, 2016 From the error message it seems you have (defun pause ...) somewhere. This is a bad idea as 'pause' is a default variable name with a default value: (= "\\" pause) => T Quote
plackowski Posted December 22, 2016 Author Posted December 22, 2016 I just went and reviewed their stamping lisp and it looks like they didn't make any of their variables local (although I guess I must have missed a few too or there wouldn't be an issue). I see some generic variables that I may have used as well, like P1, P2, etc. When I have some time I'll go back and update my routines to see if this fixes the issue. Thanks for the help! Quote
plackowski Posted December 22, 2016 Author Posted December 22, 2016 It looks like localizing a few of my variables fixed the problem. Thanks again! 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.