NSH Posted August 4, 2017 Posted August 4, 2017 Let’s say you have DWG title block template file, “DAY” with attributes tagged, “B” and “C”. You also have XLSX file, “CAL” with column A rows, (1 thru 7), column B rows, (ONE thru SEV) and column C rows, (SUN thru SAT). How do you use any programing method to create 7 drawings automatically using the template and the worksheet, numbered sequentially so that file “6.dwg” would contain title block displaying “SIX” and “FRI”? Thank You in advance. If I may be any more specific, please ask. Quote
BIGAL Posted August 5, 2017 Posted August 5, 2017 If you do a bit of searching here I posted some code using Getexcel.lsp this allows both ways autocad -> excel -> autocad. You can save a variable using setenv this is saved on your computer, using a "Script" you can run a lisp that creates new dwg but uses the correct row for the info. I am pretty sure there is numerous examples here about read excel and populate a title block. This is maybe what your script would look like, you will need to create the enviroment variable only once then it can be changed any time. (setenv "Mytitle" 1) New mydwt (setenv "Mytitle" 1) (load "My title updator") saveas dwgname close New mydwt (setenv "Mytitle" 2) (load "My title updator") saveas dwgname close New mydwt (setenv "Mytitle" 3) (load "My title updator") saveas dwgname close Quote
SLW210 Posted August 7, 2017 Posted August 7, 2017 I have moved your thread to the AutoLISP, Visual LISP & DCL Forum. 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.