Jump to content

Adding my ACADDOC.lsp file to the Support File Search Path breaks existing tools


plackowski

Recommended Posts

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.

Link to comment
Share on other sites

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])
)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...