CadFrank Posted December 22, 2011 Posted December 22, 2011 Hi i'm juste wondering if a lisp or something can set a attribute in a block to change automaticly according to the number or layout So if i create a new layout the page goes to the next and the other show how many layout it opened Quote
Lee Mac Posted December 22, 2011 Posted December 22, 2011 Insert a Field in the Attribute Value (right-click > Insert Field). Quote
CadFrank Posted December 22, 2011 Author Posted December 22, 2011 i tried its not working :S Cartouche.dwg Here is the block im trying to make the page number change Quote
CadFrank Posted December 23, 2011 Author Posted December 23, 2011 Hi here is what im looking for i think with this the code line here : (setq total (itoa (length (layoutlist)))) i could get what im looking for in the image that i have uploaded cheers and merry christmas !! hope some1 has and answer or when i come back to work ill get killed by my boss .. joke!! Quote
BlackBox Posted December 23, 2011 Posted December 23, 2011 You should consider using Sheet Set Manager (SSM). :wink: Quote
CadFrank Posted January 9, 2012 Author Posted January 9, 2012 Hi, sorry for the late reponse I was on vacation. Well i'm not to familliar with (SSM) would you know a place i could get a tutorial* or some information about it. Thx Quote
BlackBox Posted January 9, 2012 Posted January 9, 2012 No worries; congrats on your (extended?) vacation. I'm on vacation all this week as well (packing & moving). To answer your question, consider this link to the user documentation: Understand the Sheet Set Manager Interface Quote
fixo Posted January 9, 2012 Posted January 9, 2012 You may want to use this code yet I just tested it on converted A2009 format drawing (defun C:paging(/ adoc atts id lay_field) (setq adoc (vla-get-activedocument (vlax-get-acad-object))) (vlax-for lt (vla-get-layouts adoc) (vla-put-activelayout adoc lt);optional (vlax-for obj (vla-get-block lt) (if (eq "AcDbBlockReference" (vla-get-objectname obj)) (if (eq "Cartouche Aliance" (vla-get-effectivename obj)) (if (eq :vlax-true (vla-get-hasattributes obj) ) (progn (setq atts (vlax-invoke obj 'getattributes)) (foreach x atts (if (eq "PAGE" (vla-get-tagstring x)) (progn (setq id (vla-get-objectid (vla-get-layout (vla-objectidtoobject adoc (vla-get-ownerid obj))))) (setq lay_field (strcat "%<[url="file://\\AcObjProp"]\\AcObjProp[/url] Object(%<[url="file://\\_ObjId"]\\_ObjId[/url] " (itoa id)">%).Taborder [url="file://\\f"]\\f[/url] \"%tc1\">%")) (vla-put-textstring x lay_field) ) ) ) ) ) ) ) ) ) (vla-put-activelayout adoc (vla-item (vla-get-layouts adoc) 0));activate Layout1, optional (princ) ) (prompt "\Try command: Paging...") (prin1) (vl-load-com) (prin1) ~'J'~ Quote
CadFrank Posted January 10, 2012 Author Posted January 10, 2012 Well thank it works well to change the pages. If i would want to make it so that the attribute "#page" inputs the total of layout is their a way. 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.