hosannabizarre Posted July 29, 2010 Posted July 29, 2010 Currently I use a lisp file to import page setup information, which brings in previously configured plot set up information (as found in a specified drawing template). page_setups.lsp... (DEFUN C:PSN () (command "._-PSETUPIN" "W:/Library/Acad Setup/Page_Setup_Template/page_setup_template.dwg" "*")) Although I have "page_setups.lsp" identified in my startup suite of applications to load, I still have to type "PSN" to import page setup info. Typing these three letters is tiring my fingers out. Can I build the import instruction into accaddoc.lsp so that I don't have to keep typing PSN, so that it autoloads (and imports) with every session / drawing?? Cheeeeeeeeeers, hosannabizarre Quote
Tharwat Posted July 29, 2010 Posted July 29, 2010 Yes , Actually this is the way of lots of experts in programing. Try it ...... although I haven't tried it before Regards, Tharwat Quote
hosannabizarre Posted July 29, 2010 Author Posted July 29, 2010 Thanks tharwat313 The thing is, I'm not sure where to put it in the existing code. My accaddoc.lsp is as follows: ;;;*-*TXT acad.lsp is loaded once, acaddoc.lsp is loaded for each ;;; document, s::startup in any case is called after acaddoc.lsp ;;; has been loaded ; ;;(if (= nil acad_helpdlg) ;; (progn ;; (load "acadr15.lsp") ;; (load (strcat (getvar "menuname") ".mnl")) ;; ) ; (if (= nil genlade) (progn (princ (load "gen/acadm.lsp" "\nError: acadm.lsp not loaded!")) (if acadmappend (setq s::startup (acadmappend s::startup))) ) ) Can someone please identify where, in the above code, I would locate the instruction to import the page setups from my template? i.e Where would I put this... (command "._-PSETUPIN" "W:/Library/Acad Setup/Page_Setup_Template/page_setup_template.dwg" "*") I tried adding it to the end but it didn't seem to work. Thanks Quote
Pablo Ferral Posted July 29, 2010 Posted July 29, 2010 You can put it anywhere, as lon as it's outside a DEFUN statement autocad will parse it. I'm not sure that that meathod would be great technique though! Quote
hosannabizarre Posted August 17, 2010 Author Posted August 17, 2010 I have realised that the method outlined here is better. i.e. make a button which invokes a lisp like this: (defun c:plot40 nil (vl-load-com) (command "_.-plot" "yes" "" "\\\\Kwifs1\\KWIN_40" "A3" "Millimeters" "LANDSCAPE" "NO" "Extents" "FIT" "CENTER" "YES" "KWIN40.ctb" "YES" "W" "NO" "NO" "yes" ) (princ) ) 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.