acad1985 Posted August 1, 2019 Share Posted August 1, 2019 Hello Everyone, I've found a lisp routine by Lee-Mac in Here to update the Attribute Title Block from CSV file. i have a same task to be done.But in my drawing having different layout names and file Names. so i don't want to mention the file name and Layout name in CSV file. (Because i'm trying to update the csv using VBA Userform in AutoCAD, after updating title block will be updated automatically. so i don't want to enter the drawing and layout name). @Lee Mac Can you/anyone help me out to update the Title Block without drawing and Layout names in CSV file. I appreciate any help! Quote Link to comment Share on other sites More sharing options...
BIGAL Posted August 1, 2019 Share Posted August 1, 2019 You can use layout order which is a number rather than a name. have a look at this code its GOTO jumps to a layout by number. ; GOTO layout just like other goto a page ; By Alan H 2013 ; menu command [GOTO]^c^C^p(load "goto") ; enter a big number like 99 to jump to last if 100+ layouts then 123 etc ; Model space is 0 zero GOTO 0 (defun C:goto ( / x alllayouts laynum num) (if (not AH:getvalsm)(load "Multi Getvals.lsp")) (setq num (atoi (nth 0 (AH:getvalsm (list "Go To A Layout" "Enter layout number" 5 4 "1"))))) (setq alllayouts (vla-get-Layouts (vla-get-activedocument (vlax-get-acad-object)))) (SETQ LAYNUM 0) (vlax-for x alllayouts (Setq laynum (+ 1 laynum)) ) ;total number of layouts (if (> num laynum) (setq num (- laynum 1)) ) (vlax-for lay alllayouts (if (= num (vla-get-taborder lay)) (setvar "ctab" (vla-get-name lay)) ) ) ) ; I often type it wrong so added this one also (defun C:goot () (c:goto) ) ; defun Quote Link to comment Share on other sites More sharing options...
acad1985 Posted August 1, 2019 Author Share Posted August 1, 2019 Hi @BIGAL Thanks for your Reply...You are correct we can use Layout numbers instead of Layout Name. But in my drawing has different number of Layouts and also Drawing name is too long (alphabet with Numbers). so i couldn't enter it every time. I'm going to combine this script with my routine (Automatic Layout Creation). So i want to ignore the things mentioned below image Thanks. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted August 1, 2019 Share Posted August 1, 2019 The only way to not have a dwg name is to open the correct dwg then run a program, the layout could use the number order by ignoring "Layout1" starting at row 3 if layout to be skipped put something like blank or 0 . Or add a tick on in another column put a X. layout= row number - 2 Quote Link to comment Share on other sites More sharing options...
acad1985 Posted August 5, 2019 Author Share Posted August 5, 2019 Thank you so much Bigal for your time. I did this, Actually there is a option in lisp to running the command without layout name. And i get the current drawing name using VBA. Thank you Quote Link to comment Share on other sites More sharing options...
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.