Jump to content

On_doc_load.lsp Not Loading on Doc Load


Kreaten_vhar
 Share

Recommended Posts

Title pretty much. Posted in the Autolisp forum looking for a help with a routine, went alright as I managed to come up with a potential solution for iterating through a directory of several drawings to apply some system variables to them depending on this or that.

The program flow is, essentially, manually call one of the functions defined in the lisp meant to be ran on the first drawing (to setup variables that'll contain filenames more or less) then that'll call another function that'll do it's thing, ending with (vl-cmdf ".open" DWGNAME). On_doc_load then kicks in, load's the lisp file, and calls that 2nd function to do the thing. All's dandy... 

Or at least it should be! Typically the routine will work fine for all of two drawings. After that it'll open the next dwg in the list but on_doc_load seemingly fails to kick in and load/call the lisp routine.

Any ideas as to why this might be? halp plz. Attached is a capture of the commandline. The "ayy we loaded" bit is from the on_doc_load. Also did a (findfile) statement targeting the on_doc_load to show it's finding it on a freshly opened dwg.
 

Commandline capture.png

Link to comment
Share on other sites

Said screw it and wrote up an AHK script to just type the (load "blahblah.lsp) and function call. The routine is just for a specific use and won't be used by anyone else other than me so it's an acceptable solution lol :surrender:

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
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.

 Share

×
×
  • Create New...