mostafa badran Posted October 29, 2013 Posted October 29, 2013 Hi folks Is there any way to link between layout tab,file name and text string by lisp? Quote
mdbdesign Posted October 29, 2013 Posted October 29, 2013 To rename layout tab to file name: (defun c:ltdn (/) (or *AcadDoc* (setq *AcadDoc* (vla-get-activedocument (vlax-get-acad-object)))) (vlax-for l (vla-get-layouts *AcadDoc*) (if (eq 1 (vla-get-taborder l)) (vl-catch-all-apply (function vla-put-name) (list l (vl-filename-base (getvar 'dwgname)))) ) ) ) Do you need to insert file name somewhere in drawing in text format? Quote
BIGAL Posted October 30, 2013 Posted October 30, 2013 Mostafa more info please. 3 different variables add all together and label layout ? Quote
asos2000 Posted October 30, 2013 Posted October 30, 2013 Read this http://www.cadtutor.net/forum/showthread.php?79387-Renaming-layout-tab-with-2-titleblock-attributes&p=549765&viewfull=1#post549765 Quote
mostafa badran Posted October 30, 2013 Author Posted October 30, 2013 Hi, all I want linked between all of them when I change file name automatically change layout tab and text string Quote
asos2000 Posted October 30, 2013 Posted October 30, 2013 Use field for text but for layout you should use lisp for that see the link in post #4 Quote
mostafa badran Posted October 30, 2013 Author Posted October 30, 2013 mdbdesign I am waiting for your reply Quote
mdbdesign Posted October 30, 2013 Posted October 30, 2013 mdbdesign I am waiting for your reply Good, wait... My suggestion is: -use rtext (Diesel) for text string, it is old but working like a horse $(substr,$(getvar,dwgname),1,$(-,$(strlen,$(getvar,dwgname)),4)) For changing layout tab need to create button with lisp codes or just type lisp command call and update it manually whenever change file name. Unless somebody will write reactor to do it. Quote
mostafa badran Posted October 30, 2013 Author Posted October 30, 2013 mdbdesign ,Thank you so much I salute you Quote
mostafa badran Posted October 30, 2013 Author Posted October 30, 2013 asos2000,thank u for your cooperation 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.